Tag Archives: CMDB

PowerShell – Use Get-ADcomputer to get a quick overview of your AD environment

One of the tasks in ICT is maintaining an up-to-date and correct CMDB. This is also a hard task and is often not performed (properly).

Luckily however, with the PowerShell Get-ADcomputer you can get a lot of information directly from Active Directory. Try using: Get-ADComputer -Filter * -Properties *

Ofcourse if you have non-domain joined computers or non-Windows based computers you have to come up with something for that as well.

Personally, I use this command to quickly get info about my Home Lab instead of having to document it manually (with the risk of human error):
Get-ADComputer -Filter * -Properties * | select name,canonicalname,dnshostname,operatingsystem,OperatingSystemServicePack,operatingsystemversion,IPv4address | out-gridview

In the image below you can see what it looks like for me:


You can of course customize it and alter the output method. You could by example add the property Modified to see when it was last changed. You can also add the property Description if this makes sense for you. I did not enter descriptions myself, but for the cluster nodes it has been added automatically and says: “Failover cluster virtual network name account”.


Posted by on February 24, 2013 in ICT, Microsoft, Powershell


Tags: , , , ,

%d bloggers like this: