Get Computers in Active Directory

Description

This script queries the local Active Directory instance for the FQDN and OS Version of each computer in Active Directory.

Overview

This script leverages the built-in ManagementObjectSearcher class to query the Active Directory domain that the current workstation is a member of for all computers and pulls the following information:

  • Fully Qualified Domain Name
  • Operating System
  • Version

Dependencies

  • recon

Operating Systems

  • Windows

Example Output

FQDN             OS                                      Version
----             --                                      -------
DC1.lab.net      Windows Server 2019 Standard Evaluation 10.0 (17763)
WKST-001.lab.net Windows 10 Pro                          10.0 (19044)
WKST-002.lab.net Windows 10 Pro                          10.0 (19044)
WKST-003.lab.net Windows 10 Pro                          10.0 (19044)
Scroll to Top