14 lines
496 B
PowerShell
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
|
|
} |