PowerShell 6 is cross-platform, so cmdlets that relied on native functions had to be rewritten or removed. Apparently Microsoft never got around to reimplementing Test-NetConnection for other platforms. Cmdlets that manage Windows-only systems (e.g. Storage Spaces) all had to be removed. To produce a list of all the missing cmdlets, you can use PowerShell!
First run this in PowerShell 5:
Get-Command | select Name, Source | Export-Csv .\cmds5.csv
Then run it again in PowerShell 6 with a different output file:
Get-Command | select Name, Source | Export-Csv .\cmds6.csv
We can then analyze the files for differences using either PowerShell version:
$cmd5 = Import-Csv .\cmds5.csv
$cmd6 = Import-Csv .\cmds6.csv
$gone = $cmd5 | ? { $n = $_.Name; ($cmd6 | ? { $_.Name -eq $n }) -eq $null }
$new = $cmd6 | ? { $n = $_.Name; ($cmd5 | ? { $_.Name -eq $n }) -eq $null }
I tested this in a Windows 10 1703 x86 VM that should have pretty fresh PowerShell environments. I used v6.0.2 for PowerShell 6, the most recent stable version. Of the 1493 commands in PowerShell 5, 1139 were removed in PowerShell 6. I put them all in a gist. Of the 425 commands in PowerShell 6, 71 are new, all but three of which have to do with desired state configuration. Those last three are Get-Uptime, Remove-Alias, and Remove-Service. You can see all new commands in this other gist.
I'm not sure about the specific cmdlet that you are asking about but yes, V6 has many fewer cmdlets than v5 and will probably continue to have fewer for quite some time. Unless you are explicitly writing *nix or cross platform compatible scripts you should probably be using v5. – EBGreen – 2018-05-07T15:17:57.253
1PowerShell 6 is the multi-platform version of PowerShell which means it only supports those cmdlets that were ported. Windows-specific cmdlets were not ported, as they wouldn't be usable, under those other platforms. – Ramhound – 2018-05-07T15:39:13.420
You might get more information asking this question on http://stackoverflow.com/.
– Tripp Kinetics – 2018-05-07T18:10:06.950@TrippKinetics Not likely. The answer is that V6 has fewer cmdlets than windows specific versions. Period. – EBGreen – 2018-05-07T18:21:03.220
@Ramhound Note that at least some of the
NetTCPIPcmdlets are not inherently Windows specific. Unless they touch very low level OS interfaces, they can at least theoretically be ported.Test-NetConnectionshould actually be pretty easy, it's just a port of the old BSDpingcommand with typical MS 'different just to be different' changes. – Austin Hemmelgarn – 2018-05-07T19:30:42.8071
@AustinHemmelgarn - The comment was very generalized. In this case, the
– Ramhound – 2018-05-07T20:01:18.050NetTCPIPPowerShell module only exist within the Windows and has not been ported to PowerShell 6.I will also point out that since Powershell V6 is open source, if it is missing something that you feel it should have, just head on over to github and start coding. – EBGreen – 2018-05-07T20:04:59.247