PowerShell - OU Server Inventory
- Jon Boyette
- Jan 7, 2022
- 1 min read
Copy below and save as Server OU Inventory.ps1, saves output details of servers in any OU specified, c:\temp\ServerInventory.csv is the Output
get-adcomputer -SearchBase "OU=servers,dc=domain,dc=com" -filter * -property passwordlastset,operatingsystem,DNSHostName,IPv4Address,CanonicalName | select name,passwordlastset,operatingsystem,DNSHostName,IPv4Address,CanonicalName |export-csv -path c:\temp\ServerInventory.csv
Comments