Skip to content

Instantly share code, notes, and snippets.

@moinuddin14
Forked from jdforsythe/connect.ps1
Created July 14, 2017 15:00
Show Gist options
  • Save moinuddin14/c5c884af64ea81de0a17024de61095bf to your computer and use it in GitHub Desktop.
Save moinuddin14/c5c884af64ea81de0a17024de61095bf to your computer and use it in GitHub Desktop.
Remote Desktop Auto Login Powershell Script
echo "Connecting to 192.168.1.100"
$Server="192.168.1.100"
$User="Administrator"
$Password="AdminPassword"
cmdkey /generic:TERMSRV/$Server /user:$User /pass:$Password
mstsc /v:$Server
# https://technet.microsoft.com/library/hh847748.aspx
# Run PowerShell as Administrator
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment