Today’s Powershell Oneliner is one to make your manager happy:
Get-QADComputer -sizeLimit 0 |
Group-Object -Property OSName,OSServicePack -noelement |
Sort-Object -Property Count -Descending |
Format-Table -Property Count,Name
All this simple oneliner does, is query Active Directory for computer objects and group them by OS Name and Service Pack. The output looks something like this:
Count Name
—– —-
1111 Windows XP Professional, Service Pack 2
197 Windows Server 2003, Service Pack 2
136 Windows Server 2003, Service Pack 1
117 Windows 2000 Server, Service Pack 4
15 Windows XP Professional, Service Pack 1
6 Windows 2000 Server, Service Pack 3
3
1 Windows Server® 2008 Standard, Service Pack 1
Don’t you just love the ease with which you can create such a handy little overview? I know you manager will!
