PowerShell for Windows Admins:

August, 2010

August 31, 2010  2:03 PM

WMI and Network Adapters: 3

Posted by: Richard Siddaway
Network, PowerShell v2


We have seen how to query WMI for information on network adapters.  But what we didn’t get was information about the addresses allocated to the NICs.  We need a different class for that

Get-WmiObject -Class Win32_NetworkAdapterConfiguration

However this...

August 30, 2010  3:39 AM

PowerShell in Practice offer

Posted by: Richard Siddaway
Books, PowerShell v2

Today Manning are offering 50% their best selling books including PowerShell in Practice.


See www.manning.com to order

August 28, 2010  5:07 AM

WQL wildcards

Posted by: Richard Siddaway
PowerShell v2, WMI


Get-WmiObject -Class Win32_NetworkAdapter 

will show us a list of network adapters.  We can narrow this down to a specific adapter

Get-WmiObject -Class Win32_NetworkAdapter -Filter "DeviceId='11'" | fl *

What if we know that there is a...

August 26, 2010  3:14 PM

WMI and Network Adapters: 2

Posted by: Richard Siddaway
Network, PowerShell v2

Ok – just to help out we can do this to see the useful information we need to complete our IPconfig listing

Get-WmiObject -Class Win32_NetworkAdapter -Filter "NetEnabled='$true'" | Format-List NetConnectionID, Description, MACAddress, Speed

This gets a display like...

August 26, 2010  1:09 PM

WMI and Network Adapters: 1

Posted by: Richard Siddaway
Network, PowerShell v2

Network adapters are a fundamental part of our system – without them our networks grind to a halt because the machines can’t communicate. We have a good tool in ipconfig for looking at NIC information but we can extend this using PowerShell and WMI. Let’s start by seeing what is...

August 23, 2010  12:39 PM

WMI date issue

Posted by: Richard Siddaway
Operating System, PowerShell v2


Working with WMI dates can be awkward sometimes. For instance if we look at the last boot up time of our system

$machine = Get-WmiObject -Class Win32_OperatingSystem

PS> $machine.LastBootUpTime

We get a non-intuitive...

August 11, 2010  1:05 PM

Memory configuration

Posted by: Richard Siddaway


We have seen how to discover the total physical memory in a system but how is that memory arranged.

August 10, 2010  1:13 PM

WMI and office 2

Posted by: Richard Siddaway
PowerShell v2, WMI

it seems that the WMI provider I mentioned last time is effectively discontinued in Office 2010.

I’ll see if I can get a machine set up with Office 2007 to investigate further

August 9, 2010  1:55 PM

WMI at the Office

Posted by: Richard Siddaway
PowerShell v2

If you have Office 2010 installed you should find an msapps12 namespace on your machine.

The classes exposed by this namespace can be found with

Get-WmiObject -Namespace root\msapps12 –List

There are a lot of them! The classes seem to be broken down by Office...

August 8, 2010  12:51 PM

How big’s my dit

Posted by: Richard Siddaway
Active Directory, File System, PowerShell v2, WMI

The ntds.dit file is used to store Active Directory data on a domain controller. Knowing how big this file is getting is a useful piece if information. One way is to log on to each domain controller and test the size using Windows explorer. A better way is to use WMI PS> "server02", "dc02"...

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: