Created
February 25, 2020 03:06
-
-
Save PSingletary/b43f7771f7162b3088074b382b7be989 to your computer and use it in GitHub Desktop.
Create RDP icon shortcut on desktop Pre-populate IP address in shortcut
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Source: https://www.reddit.com/r/PowerShell/comments/f91iv8/powershell_rdp_shortcut/fiovdac?utm_source=share&utm_medium=web2x | |
$wshshell = New-Object -ComObject WScript.Shell | |
$lnk = $wshshell.CreateShortcut("C:\Users\Public\Desktop\RDP.lnk") | |
$lnk.TargetPath = "%windir%\system32\mstsc.exe" | |
$lnk.Arguments = "/v:$IPofTarget" | |
$lnk.Description = "RDP" | |
$lnk.Save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment