Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Remote System Duplex Speed

Posted on 2014-04-14
7
Medium Priority
?
687 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
Q2 2017 - Latest Malware & Internet Attacks

WatchGuard’s Threat Lab is a group of dedicated threat researchers committed to helping you stay ahead of the bad guys by providing in-depth analysis of the top security threats to your network.  Check out our latest Quarterly Internet Security Report!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
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…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

636 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