What this script will do:
1) It will test connection on port 5985 if the ComputerName parameter is defined.
2) It will search for local users account, their password info on remote computers.
3) If the GroupName parameter is defined, it will only search for that specific group.
4) You can sort the PasswordLastSet, LastLogon properties to find out the users with oldest password or who never logged into the computer.
5) You can export the result to csv file with .\Get_Local_Users_Info.ps1 -ComputerName MyComputerName | sort
PasswordLastSet | Export-Csv -NoType users_account_info.csv
Note: When we query the domain user's info on remote computer, there comes a Kerberos multiple-hop problem, in which we need to delegate client credentials to domain controllers, which need additional configuration on both client & server sides before the script runs. Therefore, I put the N/A values when we query the domain account info from remote domain-joined computers. You can learn more about CredSSP here:
https://blogs.msdn.microsoft.com/powershell/2008/06/05/credssp-for-second-hop-remoting/
https://msdn.microsoft.com/en-us/library/ee309365(v=vs.85).aspx
ReplyDeleteNice Blog, Best best microsoft office deals for Mac Home and Business edition is a powerful suite which fulfils the productivity applications, written for Mac OS X.