Get MAC address and network speed informations on a remote computer with PowerShell


You can retrieve network adapter informations with that WMI call :

Get-WmiObject -Class Win32_NetworkAdapter -ComputerName SOFSR2Node2

This line get all network cards plug in the remote computer, but it’s kind of verbose, so you need to add a filter to retrieve only “active” network cards :

Get-WmiObject -Class Win32_NetworkAdapter -ComputerName SOFSR2Node2 -Filter "NetConnectionID LIKE '%'"


As you can see, you have the speed, but not the MAC address but if you pipe that in “Get-Member”, you will see a property called “MACAddress”, so :

Get-WmiObject -Class Win32_NetworkAdapter -ComputerName SOFSR2Node2 -Filter "NetConnectionID LIKE '%'" | Select-Object Name,NetConnectionID,Speed,MACAddress


You can also check the Get-WmiObject help and MSDN.

Get disk informations on a remote computer with PowerShell


You can retrieve some disk information with a simple WMI call:

Get-WmiObject -Class Win32_LogicalDisk

This line retrieve all type of disks mounted on the destination host such as local disk, network drive, CD… You can also add a filter to that query, to get only local disk, on a specified remote computer like that :

Get-WmiObject -Class Win32_LogicalDisk -Filter "DriveType='3'" -ComputerName SOFSR2Node1


As you can read, the Size and FreeSpace are not really readable, you’ll need to use a dictionary like that :

Get-WmiObject -Class Win32_LogicalDisk -Filter "DriveType='3'" -ComputerName SOFSR2Node1 | Select-Object DeviceID,VolumeName,@{Label="FreeSpace(GB)";Expression={$_.FreeSpace/1GB -as [int]}},@{Label="Size(GB)";Expression={$_.Size/1GB -as [int]}}


That’s a nice output, and it’s pipe able like that :


This is a quick example of what can be done with that WMI class, but a lot more properties/methods are available :

Get-WmiObject -Class Win32_LogicalDisk | Get-Member

You can use that web page as a full and documented help, and this one for the Get-WmiObject help.