by willbs at 2013-03-20 12:30:14
my current remote nic rate is shown like thisby DonJ at 2013-03-23 09:33:03
invoke-command -scriptblock {(Get-WmiObject -Class Win32_NetworkAdapter -Filter "deviceID = ‘14’") } -computername $global:uutName -credential $global:Credential
ServiceName : iANSMiniport
MACAddress : 00:90:A9:F6:38:72
AdapterType : Ethernet 802.3
DeviceID : 14
Name : TEAM : Team
NetworkAddresses :
Speed : 1000000000
PSComputerName : 192.xxx.xxx.xxx
i create this path;
$Path = invoke-command -scriptblock {(Get-WmiObject -Class Win32_NetworkAdapter -Filter "deviceID = 14").__path } -computername $global:uutName -credential $global:Credential
which give me this result
\STG-53\root\cimv2:Win32_NetworkAdapter.DeviceID="14"
and envoke this to command to change the speed of the remote network adaptor
invoke-command -scriptblock {param($Path); Set-WmiInstance -Path $path -argument @{Speed = 10000000}} -Argumentlist $Path -computername $global:uutName -credential $global:Credential
and get this automatically generated result
ServiceName : iANSMiniport
MACAddress : 00:90:A9:F6:38:72
AdapterType : Ethernet 802.3
DeviceID : 14
Name : TEAM : Team
NetworkAddresses :
Speed : 10000000
PSComputerName : 192.xxx.xxx.xxx
it looks correct until i perform this command
invoke-command -scriptblock {(Get-WmiObject -Class Win32_NetworkAdapter -Filter "deviceID = ‘14’") } -computername $global:uutName -credential $global:Credential
there was no change in the nic rate
ServiceName : iANSMiniport
MACAddress : 00:90:A9:F6:38:72
AdapterType : Ethernet 802.3
DeviceID : 14
Name : TEAM : Team
NetworkAddresses :
Speed : 1000000000
PSComputerName : 192.xxx.xxx.xxx
any ideas?
WMI isn’t often useful for making changes - it was originally designed as a read-only repository, and different classes have varying abilities to make changes. NICs in particular are pretty inconsistent, because they also depend on the manufacturer providing a device driver that permits changes through the WMI layer. You’re probably simply dealing with a NIC that, like most, doesn’t accept changes. It’s only sending information to WMI - not reading information back from WMI to reconfigure itself.by willbs at 2013-03-27 08:28:57
That said, Win32_NetworkAdapter is deprecated. Have you looked at MSFT_NetworkAdapter? It’s Win8/2012 only, but offers a bit more functionality.
i was able to change the nic speed and duplex with these commands
all of these commands and then some are explained at
http://download.intel.com/support/netwo … setcl1.txt
#Using this command results in a list of adapters installed in a remote system and their indices
psexec \$global:uutName -u $global:username -p $global:password cmd /c 'echo . | "C:\Program Files\intel\dmix\cl\prosetcl.exe" "Adapter_Enumerate" '
#Using this command results in a list of register values for the specified adapter. Only supported properties are displayed
psexec \$global:uutName -u $global:username -p $global:password cmd /c 'echo . | "C:\Program Files\intel\dmix\cl\prosetcl.exe" "Adapter_EnumerateProperties" "1" '
#get a list of valid settings of nic card #1
psexec \$global:uutName -u $global:username -p $global:password cmd /c ‘echo . | "C:\Program Files\intel\dmix\cl\prosetcl.exe" "adapter_getsetting" "1" "*SpeedDuplex"’
#change speed and duplex of nic #1 on UUT
psexec \$global:uutName -u $global:username -p $global:password cmd /c ‘echo . | "C:\Program Files\intel\dmix\cl\prosetcl.exe" "adapter_setsetting" "1" "*SpeedDuplex" "100 Mbps Full Duplex"’
psexec \$global:uutName -u $global:username -p $global:password cmd /c ‘echo . | "C:\Program Files\intel\dmix\cl\prosetcl.exe" "adapter_setsetting" "1" "*SpeedDuplex" "100 Mbps Half Duplex"’ psexec \$global:uutName -u $global:username -p $global:password cmd /c ‘echo . | "C:\Program Files\intel\dmix\cl\prosetcl.exe" "adapter_setsetting" "1" "*SpeedDuplex" "Auto Negotiation"’
psexec \$global:uutName -u $global:username -p $global:password cmd /c ‘echo . | "C:\Program Files\intel\dmix\cl\prosetcl.exe" "adapter_setsetting" "1" "*SpeedDuplex" "10 Mbps Full Duplex"’
psexec \$global:uutName -u $global:username -p $global:password cmd /c ‘echo . | "C:\Program Files\intel\dmix\cl\prosetcl.exe" "adapter_setsetting" "1" "*SpeedDuplex" "1.0 Gbps Full Duplex"’