get msoluser - get users with password 90 days since last set

%3CLINGO-SUB%20id%3D%22lingo-sub-2215974%22%20slang%3D%22en-US%22%3Eget%20msoluser%20-%20get%20users%20with%20password%2090%20days%20since%20last%20set%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2215974%22%20slang%3D%22en-US%22%3E%3CP%3Ehi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eis%20there%20a%20script%20that%20can%20export%20users%20with%20password%2090%20days%20since%20last%20set%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Etnx%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2215974%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2216537%22%20slang%3D%22en-US%22%3ERe%3A%20get%20msoluser%20-%20get%20users%20with%20password%2090%20days%20since%20last%20set%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2216537%22%20slang%3D%22en-US%22%3EYou%20can%20try%20something%20like%20this%3A%3CBR%20%2F%3E%3CBR%20%2F%3EGet-MsolUser%20-All%20%7C%20%3F%20%7B%24_.LastPasswordChangeTimestamp%20-ge%20(Get-Date).AddDays(-90)%7D%20%7C%20Export-CSV%20blabla.csv%20-nti%3C%2FLINGO-BODY%3E
Super Contributor

hi,

 

is there a script that can export users with password 90 days since last set?

 

tnx

1 Reply
You can try something like this:

Get-MsolUser -All | ? {$_.LastPasswordChangeTimestamp -ge (Get-Date).AddDays(-90)} | Export-CSV blabla.csv -nti