Reading Time: < 1 minute

If you are looking for a quick way of exporting an inventory of all the Windows Servers that reside within an AD environment, look no further!

PowerShell to the rescue!

Requirements for using PowerShell AD Module related cmdlets:

  • Windows 7 and onward with RSAT Tools Installed
  • Windows Server 2008 R2 and onward with RSAT Tools Installed or AD Domain Services Installed with its Management Tools

The following One-Liner will return a list of all the Computer objects running Windows Server OS within an AD environment. 

In case you need to export the resulted inventory to a file you just need to alter a bit the one-liner.

Thanks for reading!