Worst product name (really this is even worse than powershell)

Ok, I take it all back. It's not that bad—at least what it’s called is what it promises: a powerful shell. So in PowerShell today, I ran this:

Get-WmiObject -query "SELECT NetConnectionStatus FROM Win32_NetworkAdapter"

The assumption? That PowerShell would connect to WMI (which it did) and return the network connection status. It’s all lies—LIES!!!

I have no idea what it actually returned, but it sure wasn’t the connection status this layman wanted. Instead, it spat out a ton of:

__GENUS : 2
__CLASS : Win32_NetworkAdapter
__SUPERCLASS :
__DYNASTY :
__RELPATH :
__PROPERTY_COUNT : 1
__DERIVATION : {}
__SERVER :
__NAMESPACE :
__PATH :
NetConnectionStatus :

Follow that up with:

Get-WmiObject 'Win32_NetworkAdapter'

Which does give useful network adapter info—except it leaves out the IP address (and the speed, which is a nice-to-have). Here’s what it did return:

ServiceName   : iBcT0201
MACAddress    : 02:C0:EE:XX:XX:XX
AdapterType   : Ethernet 802.3
DeviceID      : 12
Name          : iBurst Modem Type02-01
NetworkAddresses :
Speed         :

I don’t blame PowerShell for this craziness—I blame WMI. It promises so much in its arguments and delivers something completely different.