PowerShell Script to Generate Active Directory Computer OS Report Across Multiple Domains

Managing multiple Active Directory domains often requires consolidated reporting.

This PowerShell script connects to multiple AD domains, collects computer account details, and exports the data into a CSV report with a timestamped filename.

What This Script Does

Connects to multiple Active Directory domains

Retrieves:

Computer Name

Operating System

Operating System Version

Computer account creation date

Adds the domain name to each record

Sorts the results alphabetically

Exports the data to a CSV file for reporting or audits

PowerShell Script