Server 2008 R2 Powershell version 4 cannot use Get-Net* (anything) commands
brand new ps here.
i have new install of 2008r2 , have updated powershell 4 installing windows management framework 4.0. system has dotnet 4.5.1 on well.
i trying run script setting ip part of example shown in following blog:
so far have run brick wall unable break code using get-netadapter command.
in example, following shown: $ipif = (get-netadapter).ifindex new-netipaddress -ipaddress $ipaddress -prefixlength $ipprefix -interfaceindex $ipif -defaultgateway $ipgw
when running script, ps errors "get-netadapter : term 'get-netadapter' not recognized name of cmdlet, function, script file, or operable program"
i found using "$ipif = get-command -module netadapter -interfaceindex" , nothing. when use powershell ise, no error given either , intellisense feature no help.
i have executed get-module on system , output:
moduletype version name exportedcommands
---------- ------- ---- ----------------
script 1.0.0.0 ise {get-isesnippet, import-isesnippet, new-isesnippet}
manifest 3.1.0.0 microsoft.powershell.management {add-computer, add-content, checkpoint-computer, clear...
manifest 3.0.0.0 microsoft.powershell.security {convertfrom-securestring, convertto-securestring, get...
manifest 3.1.0.0 microsoft.powershell.utility {add-member, add-type, clear-variable, compare-object...}
manifest 3.0.0.0 microsoft.wsman.management {connect-wsman, disable-wsmancredssp, disconnect-wsman...
executing command $psversiontable returns following:
name value
---- -----
psversion 4.0
wsmanstackversion 3.0
serializationversion 1.1.0.1
clrversion 4.0.30319.18408
buildversion 6.3.9600.16406
pscompatibleversions {1.0, 2.0, 3.0, 4.0}
psremotingprotocolversion 2.2
i welcome suggestions, comments and/or pointers correct direction in travel.
thanks in advance
hi,
afaik, get-netadapter requires ws2012+ used.
don't retire technet! - (don't give yet - 12,575+ strong , growing)
Windows Server > Windows PowerShell
Comments
Post a Comment