Posts Tagged ‘script’
A PowerShell script to help manage user and machine accounts.
Get inactive / old computer in your domain as a simple CSV. # Gets time stamps for all computers in the domain that have NOT logged in since after specified date import-module activedirectory $domain = “domain.mydom.com” $DaysInactive = 90 $time = (Get-Date).Adddays(-($DaysInactive)) # Get all AD computers with lastLogonTimestamp less than our time Get-ADComputer -Filter…
Read More