Kazmarek

Free Site Analysis 1-858-952-5400
REMOTE ASSISTANCE
  • Home
  • OnGoing Management
  • IT Services
    • Microsoft 365, Exchange Services, and Consulting
    • Cloud Solutions
    • Virtualization
    • Mobility
    • Backup & Disaster Recovery
    • Server Installation/Migration
    • VoIP
    • Network & System Administration
    • Additional Solutions
  • Why Kazmarek
    • Case Studies
    • Testimonials
    • KTS Values
  • For Clients
    • O365 Log In
    • Client Portal
    • KTS Documents
    • SonicWALL VPN Client
  • News
    • Newsletters
  • Who We Are
    • Company
    • Team
    • KTS E-Award Winners
    • KTS Values
    • Charities We Support
  • Contact Us
    • Contact Us
    • Careers

Enable Remote Desktop Connections from a Remote Location

October 31, 2007 by Kazmarek Administrator

If you dont have physical access to a PC or Server and you need to get remotely connected but the PC doesnt have the option to accept remote desktop connections, you can create a simple vbscript executable to do the trick. 

Copy the text below into a new text document.  Rename the file to .vbs  Run the file from the same network as the target system and be sure you are logged in with domain admin credentials.  You will be prompted to enter the PC name or IP address and thats it!

Code starts below this line =========================================

Const ENABLE_CONNECTIONS = 1

strComputer = InputBox(“Enter a computer name or IP:”,”RDP Remote Enable”)
If Len(strComputer) > 1 then
 Set objWMIService = GetObject(“winmgmts:” _
      & “{impersonationLevel=impersonate}\” & strComputer & “rootcimv2”)

 Set colItems = objWMIService.ExecQuery _
      (“Select * from Win32_TerminalServiceSetting”)

 For Each objItem in colItems
      errResult = objItem.SetAllowTSConnections(ENABLE_CONNECTIONS)
 Next
End If

Code ends above this line=========================================

Categories

  • Active Directory
  • Backup Exec (All Versions)
  • Blackberry / Blackberry Enterprise Server
  • Citrix
  • Cool Tech Stuff
  • CRM
  • Dell
  • Exchange 2007
  • Exchange 2010
  • Exchange 2013
  • Exchange Hosted
  • Exchange Server
  • Group Policy
  • IIS
  • Kaseya
  • kazmarek
  • MacOS
  • Microsoft
  • Networking
  • newsletter
  • Office
  • Office 365
  • Office Communications Server
  • OfficeScan
  • Outlook
  • Printing
  • SBS 2003
  • SBS 2008
  • SBS 2011
  • Server 2003
  • Sharepoint
  • Spyware
  • SQL
  • Symantec
  • Terminal Server
  • Thawte
  • Trend Micro
  • Uncategorized
  • Virtual Server
  • Websense
  • Windows 7
  • Windows Mobile
  • Windows Server 2008
  • Windows Server 2012
  • Windows Vista
  • Windows XP Pro/Home
Copyrights: © 2023 Kazmarek. All rights reserved.

Designed by TinyFrog & N Halie Designs