I need this down to as few characters as possible. I would use Test-NetConnection but I need PSv2 compatability. Any help would be appreciated.
$socket = new-object Net.Sockets.TcpClient $socket.Connect("192.168.5.5",445) $socket.Connected
As a note I have tried this but it doesn't work