About us

IIS covers the IT solutions to the issues come across now and then in a company IT infrastructure including Operating system, Softwares, Scriptings, securities and reviews.

Thursday, 6 March 2014

PowerShell Scripts - Machine details from AD

It is also possible to fetch the Operating system and Machine name from Active Directory for which simple one line is enough. This script can fetch more in less time as it simply has to connect to active directory database. Other ways to pull the same information is to run a script remotely to each and every computer one by one remotely and then have data. More information can also be added like version, fsdn by just extending the script.

Below script will give away the output in a well defined table and can be used to create dashboard.

Get-ADComputer -Filter * -Property * | Format-Table Name,OperatingSystem -Wrap –Auto 


Same Information can be achieved by using Power shell also.


DSQUERY Computer "OU=OUNAME,DC=india,DC=DOMAINNAME,DC=local" -name COMPName* -scope subtree -limit 0 > C:\ComputerOU.csv


Regards, IIS

No comments:

Post a Comment