Windows Script : Enables Remote Desktop on Remote computers

Enables Remote Desktop on any computer (including a remote computer)

Note : I tested in my Windows Xp and Windows 7 .Work great !!!
Save as .vbs and execute.

Dim strPC
strPC = InputBox(“What machine would you like to connect to and enable remote desktop?”, _
“Connect to Server”)
set oRD = GetObject(“winmgmts:{impersonationLevel=impersonate}!//”& strPC & _
For each srv in oRD
If srv.AllowTSConnections <> 1 Then
MsgBox “Remote Desktop Now enabled”
MsgBox “Remote Desktop is already enabled”
end If

Thanks to Jeremy McGuinn

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.