Skip to content

Open-Rdp

Opens the RDP app

#requires -version 5.1

param([string]$hostname = "")

if ($hostname -eq "") {
	& Start-Process "$env:WINDIR\system32\mstsc.exe"
} else {
	& Start-Process "$env:WINDIR\system32\mstsc.exe" -ArgumentList "/v:$hostname"
}
exit 0 # success

An interactive directory of PowerShell scripts.