Hi, there!!
I'm speaking about this excellent function from here: https://gallery.technet.microsoft.com/scriptcenter/Get-LockedOutLocation-b2fd0cab#content and I've made it work. In the domain where I'm logged in, I can find formation,
but how to get this function work forest wide? Getting following error: WARNING: Cannot find an object with identity: 'whateveruser' under: 'DC=eur,DC=ccc,
I was able to run following command and get relevant information:
Get-ADUser -Filter {EmployeeID -eq "whateveruser"} -SearchBase 'DC=amr,DC=ccc,DC=company,DC=com' -server "GCServername:3268" -Properties LockedOut, badPwdCount, AccountLockoutTime, LastBadPasswordAttempt | ft -AutoSize Name, LockedOut, badPwdCount, AccountLockoutTime, LastBadPasswordAttempt
The trick here is using global catalog with -server option. But Get-LockedOutLocation much more useful than the command I've posted above. Any help will be highly appreciated.
Thank you in advance,
Igor R.