Link to home
Start Free TrialLog in
Avatar of Dhiraj Mutha
Dhiraj MuthaFlag for United States of America

asked on

Remote System Duplex Speed

Can you help me on How do I check the network duplex speed remotely using a script.
Avatar of Haresh Nikumbh
Haresh Nikumbh
Flag of India image

Avatar of Dhiraj Mutha

ASKER

This does not work. I tried this before posting this question.
ASKER CERTIFIED SOLUTION
Avatar of Justin Yeung
Justin Yeung
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Justin. I ran the script and found it running, but everytime it shows up as the Nic is set to Auto Negotiation.
I tried changing the registry from 0 to 4, but still it shows Auto Negotiation.
Its ok. I figured it out. Thanks a lot.
The script works great. This is what I was looking for.
Exactly what I was looking for. Thanks Justin.
I changed a bit, it should display the registry *SpeedDuplex numbers and see if that is correct, and remember your registry need to be closed after you changed it on the remote server.

$servers = Get-ADComputer -Filter {OperatingSystem -like "*2012*"} -Properties *
foreach ($server in $servers)
{
$Servername = $Server.name

$registry = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine, $serverName)
$baseKey = $registry.OpenSubKey(“SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}”)
$Subkey = $basekey.GetSubKeyNames()  
foreach ($Sub in $Subkey)
{
if ($sub -like "0*")
{
$Result = $baseKey.OpenSubkey($sub).GetValue("*SpeedDuplex") 

Write-Host $result "of" $($baseKey.OpenSubkey($sub).GetValue("DriverDesc")) "on" $Servername

}
}
} 

Open in new window