Kansa icon indicating copy to clipboard operation
Kansa copied to clipboard

Some networking modules are not compatible with Windows 7

Open jvaldezjr1 opened this issue 9 years ago • 6 comments

I noticed in a run I did on a Win 7 host, some PowerShell cmdlets are only available to Windows 8.1 / Server 2012 family of operating systems. Below is a copy of the error message.

Get-NetRoutes reports error on localhost: "The term 'Get-NetRoute' 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."

Get-NetIPInterfaces reports error on localhost: "The term 'Get-NetIPInterface' 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."

This article here mentions the use of Net TCP/IP cmdlets: https://technet.microsoft.com/en-us/library/hh826123%28v=wps.630%29.aspx#feedback

My suspicion is that this may affect Windows 2008 Server OSes also if you try to run those modules. I'm sure there are other ways of getting this information, but wanted to highlight the issue. YMMV.

jvaldezjr1 avatar Oct 07 '15 17:10 jvaldezjr1

I believe these cmdlets are PSv3 and later, I don't think it's an OS version issue. Ymmv. In general, we've tried to avoid requiring anything later than PSv2, but obviously there are some exceptions.

davehull avatar Oct 07 '15 17:10 davehull

I've got PSv4 on my Win7 box but the cmdlets there don't run. The modules do not show up with Get-Command either.

jvaldezjr1 avatar Oct 08 '15 14:10 jvaldezjr1

PS version specific cmdlets, OS specific cmdlets, third-party cmdlets... I can't keep them all straight. Linux's RPM has a --whatprovides so you can find out where a file comes from. It would be nice if PowerShell had something similar.

davehull avatar Oct 08 '15 15:10 davehull

Add to that, I think PSv5 will only run on Windows 8.1/2012 family OSs too.

jvaldezjr1 avatar Oct 09 '15 17:10 jvaldezjr1

Make sure you are including the ".ps1" extension at the end of the cmdlet name.

slw07g avatar Nov 28 '17 13:11 slw07g

Some Windows 8+ modules are CDXML based. They can’t be made available on Windows 7 because the underlying WMI classes aren’t available; NetTCPIP is one of those modules.

Here is a list of modules that might not work on Windows 7 due to the classes not being available. BranchCache DirectAccessClientComponents DnsClient iSCSI MsDtc NetAdapter NetConnection NetLbfo NetQos NetSecurity NetSwitchTeam NetTCPIP NetworkConnectivityStatus NetworkTransition PrintManagement ScheduledTasks SmbShare SmbWitness Storage VpnClient Wdac

PolarBearGod avatar Mar 30 '18 13:03 PolarBearGod