Disclaimer
This is my personal blog. The opinions and views I express are my own. The information I provide is on an as-is basis. I make no representations as to accuracy, completeness, currentness, suitability, or validity of any information on this blog and will not be liable for any errors, omissions, or delays in this information or any losses, injuries or damages arising from its use.

Get list of inactive computers (powershell)

This script will query AD and retrieve all computers that have not authenticated in 90 days, it then exports the results to the stale_computers.csv file.

# This script requires you install Quest ActiveRoles Management Shell for Active Directory found here: http://www.quest.com/powershell/activeroles-server.aspx
#
# This script will query AD and retrieve all computers that have not authenticated in 90 days, it then exports the results to the stale_computers.csv file 

get-qadcomputer -InactiveFor 90 | export-csv c:\stale_computers.csv

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.