#start an remote desktop sessie
function Start-RDPSession {
	param([string]$ComputerName=$(Throw "Missing computername argument!!"),
		[switch]$Admin)
 
	if ($Admin) {
		Invoke-Expression -Command "mstsc.exe /v:$ComputerName /admin"}
	else {
		Invoke-Expression -Command "mstsc.exe /v:$ComputerName"}
}

Tags: ,

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">