PowerShell for Windows Admins:

Network


August 27, 2011  3:18 PM

Msndis class



Posted by: Richard Siddaway
Network

The MSNdis class from the root\wmi namespace calls the MSNdis_CoHardwareStatus and MSNdis_CoDriverVersion classes. On my Windows 7 system it tries to call something else but I get a “Get-WmiObject : Not supported” error. Neither of these classes seems to have much in the way of documentation...

August 25, 2011  12:46 PM

Network Adapter details



Posted by: Richard Siddaway
Network

In this post -

Bookmark and Share     0 Comments     RSS Feed     Email a friend


August 24, 2011  2:25 PM

Testing the network speed



Posted by: Richard Siddaway
Network

In the last post I showed how to use the MSNdis_LinkSpeed class. Digging into the class information I found a suggestion that the speed returned was in Kbps. The answers didn’t look right especially when they suggested my wireless network was running at 540Mbps!

At bit of...


August 24, 2011  2:15 PM

Network Link Speed



Posted by: Richard Siddaway
Network

The root\wmi Namespace contains a class that just returns the link speed of your network card. Quick and easy to use function.

function get-linkspeed{            
			


August 22, 2011  1:03 PM

Ping a subnet



Posted by: Richard Siddaway
Network

I recently needed to find which IP addresses were active on a subnet to track down a printer. Quickest way was to ping them.

 

function ping-subnet {           ...


August 21, 2011  11:01 AM

Ethernet Errors



Posted by: Richard Siddaway
Network

While we are looking at the MSNdis_Ethernet* classes we should consider these three that pick up potential problems

MSNdis_EthernetReceiveErrorAlignment
MSNdis_EthernetOneTransmitCollision
MSNdis_EthernetMoreTransmitCollisions

 

If all is well we...


August 19, 2011  1:10 PM

Testing MAC address changes



Posted by: Richard Siddaway
Network

My recent post on using MSNdis_EthernetCurrentAddress to get the MAC address may have had you saying so what because I can do this

 

Get-WmiObject -Class Win32_NetworkAdapter -ComputerName "." | select Name, MACAddress

 

However, there is...


August 18, 2011  1:01 PM

Find the MAC address



Posted by: Richard Siddaway
Network, PowerShell v2, WMI

One thing that has bugged me for years is having to use the /all parameter with ipconfig to get the MAC address. It also doesn’t work on remote machines. bah humbug.

The MSNdis_EthernetCurrentAddress class in the root\wmi namespace offers a quicker way


				
				
  Bookmark and Share     0 Comments     RSS Feed     Email a friend


August 1, 2011  6:44 AM

Network client



Posted by: Richard Siddaway
Network

Need to test the network client?

PS (6) > Get-WmiObject -Class Win32_NetworkClient


__GENUS          : 2
__CLASS          : Win32_NetworkClient ...


July 29, 2011  3:08 PM

Network Adapter speed and duplex



Posted by: Richard Siddaway
Network, PowerShell v2, WMI

One thing that can cause problems on the network is the duplex setting on the network adapter.  If this doesn’t match the switch port then at best you will get performance issues and at worst no connectivity.

The speed of the connection can be obtained from Win32_NetworkAdapter...