Posts archive for December, 2016

Get values of all the properties of a PowerShell object

Lets say you want to list all properties of an object but you don’t know all of them by name. Here is comming in help the Get-Member cmdlet. I find it very useful especially when working with new objects that I’m not familiar with.

I’m going to give an example with the list of network adapters listed from the WMI.

 So, lets list all of the members.

Get-Wmiobject Win32_NetworkAdapter | where { $_.Speed -ne $null -and $_.MACAddress -ne $null } 
Read more