Enable Remote Desktop Permission Settings

Establishing remote connection of the endpoint taking longer time ??

Now this has been made easy with our script.

Please refer the below script which enables the Remote Desktop Permission setting in the endpoints.



import os
import ctypes
class disable_file_system_redirection:
    _disable = ctypes.windll.kernel32.Wow64DisableWow64FsRedirection
    _revert = ctypes.windll.kernel32.Wow64RevertWow64FsRedirection
    def __enter__(self):
        self.old_value = ctypes.c_long()
        self.success = self._disable(ctypes.byref(self.old_value))
    def __exit__(self, type, value, traceback):
        if self.success:
            self._revert(self.old_value)

with disable_file_system_redirection():
    Enable_Remote = os.popen('"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f"').read()
    print Enable_Remote
    print  "The Remote Desktop permission for the user has been enabled successfully"



SAMPLE OUTPUT:

20170522-Enable_Remote_Desktop_Permission_setting.json (1.25 KB)