?
Solved

Remote System Duplex Speed

Posted on 2014-04-14
7
Medium Priority
?
665 Views
Last Modified: 2014-04-15
Can you help me on How do I check the network duplex speed remotely using a script.
0
Comment
Question by:Dhiraj Mutha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 22

Expert Comment

by:Haresh Nikumbh
ID: 40000472
0
 
LVL 14

Author Comment

by:Dhiraj Mutha
ID: 40001463
This does not work. I tried this before posting this question.
0
 
LVL 14

Accepted Solution

by:
Justin Yeung earned 2000 total points
ID: 40002535
Search for all AD computer with OS -like 2012........... and display the result

$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") 

switch ($Result) 
    { 
        0 {"$($baseKey.OpenSubkey($sub).GetValue("DriverDesc")) is Auto Negotiation on Server $serverName"} 
        1 {"$($baseKey.OpenSubkey($sub).GetValue("DriverDesc")) is 10 Mbps Half Duplex on Server $serverName"} 
        2 {"$($baseKey.OpenSubkey($sub).GetValue("DriverDesc")) is 10 Mbps Full Duplex on Server $serverName"} 
        3 {"$($baseKey.OpenSubkey($sub).GetValue("DriverDesc")) is 100 Mbps Half Duplex on Server $serverName"} 
        4 {"$($baseKey.OpenSubkey($sub).GetValue("DriverDesc")) is 100 Mbps Full Duplex on Server $serverName"} 
        5 {"$($baseKey.OpenSubkey($sub).GetValue("DriverDesc")) is 1.0 Gbps Half Duplex Server $serverName"} 
        6 {"$($baseKey.OpenSubkey($sub).GetValue("DriverDesc")) is 1.0 Gbps Full Duplex on Server $serverName"}
        7 {"$($baseKey.OpenSubkey($sub).GetValue("DriverDesc")) is in an unknown speed on Server $serverName"} 
    }

}
}
}

Open in new window

0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 14

Author Comment

by:Dhiraj Mutha
ID: 40002574
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.
0
 
LVL 14

Author Comment

by:Dhiraj Mutha
ID: 40002601
Its ok. I figured it out. Thanks a lot.
The script works great. This is what I was looking for.
0
 
LVL 14

Author Closing Comment

by:Dhiraj Mutha
ID: 40002603
Exactly what I was looking for. Thanks Justin.
0
 
LVL 14

Expert Comment

by:Justin Yeung
ID: 40002612
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

0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
There are times when we need to generate a report on the inbox rules, where users have set up forwarding externally in their mailbox. In this article, I will be sharing a script I wrote to generate the report in CSV format.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question