Get Computers and IP Addresses in Active Directory

Description

This script queries the local Active Directory instance for the FQDN, IP addresses, 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      IPAddresses
----             --                                      -------      -----------
DC1.lab.net      Windows Server 2019 Standard Evaluation 10.0 (17763) 192.168.1.2
WKST-001.lab.net Windows 10 Pro                          10.0 (19044) {fe80::4d29:4f21:ff5:d73f%5, 192.168.1.103}
WKST-002.lab.net Windows 10 Pro                          10.0 (19044) 192.168.1.102
WKST-003.lab.net Windows 10 Pro                          10.0 (19044) 192.168.1.101
Scroll to Top