Why use this template?
Use this free PowerShell script when you need to export computers and operating systems. It is generated locally and can be reviewed before you run it yourself in your own PowerShell session.
The template uses ActiveDirectory and requires Directory read access. Output: CSV report. Level: Beginner. Action: Read-only. Risk: Low.
Review before running
The script is generated in your browser. Read it before you run it, and test it outside production first. “Read-only” describes the script itself; anything you add around it can still change data.
Generate the script
- Open the template in the PowerShell Builder.
- Enter the requested values and review the module, permissions, output and risk.
- Generate the script, read it carefully, and test it outside production before use.
The script is generated locally in your browser. Nothing needs to be uploaded to Opselith.
Generate Export AD computers →How to use this result
Use this report to create a basic Active Directory computer inventory with operating-system, account-state and replicated logon information.
When this helps
- Create a workstation and server account inventory for review or migration preparation.
- Compare operating-system versions and enabled state across AD computer objects.
- Use one CSV as a starting point before a stale-computer or disabled-computer review.
How to read the result
- Each row is an Active Directory computer object with DNS host name, operating system information, Enabled and LastLogonDate.
- LastLogonDate is a replicated approximation and should not be treated as precise device-activity telemetry.
Things to check
- OperatingSystem and OperatingSystemVersion are directory attributes and can be blank or outdated when the computer object has not refreshed them.
- This inventory does not prove that a computer is managed, online, compliant or still owned by the expected user or team.
What to do next: Filter the CSV by enabled state, operating system or last logon date, then use the stale- or disabled-computer report for a narrower lifecycle review.
Related tasks
Official references