Powershell: Test-NetConnection cmdlet is missing from PowerShell Core 6.2.3 release

Created on 19 Nov 2019  路  5Comments  路  Source: PowerShell/PowerShell

Get-Command Test-NetConnection
Get-Command : The term 'Test-NetConnection' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • Get-Command Test-NetConnection
  • ~~~~~~
  • CategoryInfo : ObjectNotFound: (Test-NetConnection:String) [Get-Command], CommandNotFoundException
  • FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand
Issue-Question Resolution-Answered

Most helpful comment

I believe NetTCPIP has now been ported as well, but you'll need a recent Windows edition:

test-netconnection

All 5 comments

@sidsolutions-net the Test-NetConnection command is only available from the Windows PowerShell NetTCPIP module. You'll need to have the Windows PowerShell module loaded to be able to use the command. You may need to make sure your Windows PowerShell module locations are present in $env:PSModulePath to be able to load the module by name, otherwise you can always load it directly by the full path.

In latest builds you can load Core incompatible modules in background Windows PowerShell session (#10973):

Import-Module -UseWindowsPowerShell NetTCPIP

I believe NetTCPIP has now been ported as well, but you'll need a recent Windows edition:

test-netconnection

Yes, I see
` CompatiblePSEditions = @('Desktop', 'Core')
in its psd1 file.

This issue has been marked as answered and has not had any activity for 1 day. It has been closed for housekeeping purposes.

Was this page helpful?
0 / 5 - 0 ratings