Power Shell and AD assistance

Shambler

Supreme [H]ardness
Joined
Aug 17, 2005
Messages
6,419
I'd like to get some help with using powershell to get some info from AD

Specifically:
Machine Name, OS, and not in one specific OU.

I've messed around with DS query, get-adobject etc etc, but run into a bit of an issue. Our environment has around 25-30k objects and the script either takes forever or it fails.

Additional info: I'd like to get this info once or twice a month. I'll then take it and compare it to what SCCM and another management tool has for object counts.

Ideas/Thoughts on a faster query or better way to do this?
 
It could take a few minutes, but you should be able to achieve this with powershell rather easily. Assuming the AD powershell applets are installed:

Code:
Get-ADComputer -filter * -Properties OperatingSystem | select OperatingSystem,Name | out-file computers.txt
 
Back
Top