Get-PC/Private/RemoteDesktopApp.ps1
Zachary Gorman 4a01da0e5d Init commit
2024-06-11 11:27:55 -07:00

14 lines
496 B
PowerShell

Function Get-RemoteDesktopApp($ComputerName){
if(!(Test-Connection -ComputerName $ComputerName -Count 1)){
Write-Host "No connection could be made to $ComputerName..." -ForegroundColor Red
break
}
Write-Host "Starting Remote Desktop Connection to $ComputerName" -ForegroundColor Green
Start-Process "$env:windir\system32\mstsc.exe" -ArgumentList "/v:$ComputerName"
Write-Host "Connecting to $ComputerName" -ForegroundColor Green
}