PowerShell – List All Domain Users and Their Last Logon Time
KB ID 0000752 Problem In the past I’ve looked at third party tools to do this but what if you wanted to use PowerShell? Solution Heres’ a cool solution that might interest you also Updating Domain Computer Objects with User and Machine Information 1. On your server paste the following script into Notepad; $NumDays = 0 $LogDir = “.Users-Last-Logon.csv” $currentDate = [System.DateTime]::Now $currentDateUtc...