Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

AD users that have never logged on showing their passwords are pre-expired

$
0
0

Hi, I trying to get information about never logged users in AD on showing their passwords are pre-expired, could someone verify script below, is it fine or I should add anything else?

get-aduser  -properties * -f {-not (lastlogontimestamp -like "*") -and (enabled -eq $true) -and (PasswordNeverExpires -eq $false)} | select-object name, passwordExpired, PasswordNeverExpires,SAMaccountname, lastlogondate, lastlogontimestamp, logoncount, whenCreated, PasswordLastSet 


AG


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>