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

Submitted by Robert MacLean on Thu, 02/08/2007 - 20:15

Ok, I thought PowerShell was bad, I take it all back. It's not that bad, atleast what it is 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 is that PowerShell would connect to WMI (which it did) and return network connection status. It is all lies, LIES!!!!
I have no idea what it did return but it was not the connection status this layman wanted, it is just lots of:
__GENUS : 2
__CLASS : Win32_NetworkAdapter
__PATH :
NetConnectionStatus :

Follow this up with Get-WmiObject 'Win32_NetworkAdapter' which I assume will give me useful network adapter info, which it does give, but it leaves out a little bit of useful info... THE IP ADDRESS! (and the speed but thats a nice to have)

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 crazyness, I blame WMI. It promises so much in it's arguments and gives you something completely else.