none
Script to export users who are inactive for more than 90 days RRS feed

  • Question

  • I am trying to export list of users who are idle for more than 90 days, I've used below command but it seems it is not giving correct data. Please help!

    Search-ADAccount -UsersOnly -AccountInactive -TimeSpan 90 | Get-ADUser -Properities Name, sAMAccountName, givenName, sn, userAccountControl | Where {($_.userAccountControl -band 2) -eq $False} | Select Name, sAMAccountName, givenName, sn

    Thursday, November 21, 2019 9:55 PM

All replies