PowerShell cmdlet Test-NetConnection not available PowerShell cmdlet Test-NetConnection not available powershell powershell

PowerShell cmdlet Test-NetConnection not available


The availability of many cmdlets is tied to the Windows version, not the PowerShell version. If you can't upgrade your Windows version you can't have Test-NetConnection.

You could use a commandline port scanner like nmap or scanline for port tests, or you could connect to the port(s) yourself:

function Test-Port($server, $port) {    $client = New-Object Net.Sockets.TcpClient    try {        $client.Connect($server, $port)        $true    } catch {        $false    } finally {        $client.Dispose()    }}