Hello everyone,
I am new at the forums and with power shell too.
I've been going to guides but can't figure it out myself.
I want to write a command in PS3 (I am using windows server 2012) that will get users who's lastlogondate is greater than 1/1/2010 and filter for ChangePasswordAtLogon = $true. But I can't figure it out how to use both filterings together.
Below is the command to get the lastlogondate. Can you please help me to add ChangePasswordAtLogon filter to it?
get-aduser -filter {lastlogondate -gt "1/1/2010"} -Properties lastlogondate | select Name,LastLogonDate | sort lastlogondate | Export-Csv c:\usersss.txt
Thank you for your time,
Pawel