$getDate=(get-date).addDays(-30).tostring("MM\/dd\/yyyy hh:mm:ss" ) get-aduser -f * -pr lastlogondate |where-object {$_.lastlogondate -lt $getdate}|ft samaccountname,lastlogondate
Le reste , c'est un export csv envoyé par mail.