Check Remote Desktop Protocol Port
Test-NetConnection -Computer $Server -CommonTCPPort RDP
Check if Port is Open
$socket = new-object Net.Sockets.TcpClient $socket.Connect($IPAddress,$Port) $socket.Connected