Forum Discussion

Billvel's avatar
Billvel
Copper Contributor
May 15, 2021

Extract "pwdLastSet, Password expires, Password changeable, Password required, PowerShell

Extract "Password Last set, Password expires, Password changeable, Password required, User may change password" property for all Staff OU users and export to csv

  • AndySvints's avatar
    AndySvints
    Steel Contributor

    Hello Billvel,

    Did you look into Get-ADUser and Export-Csv?

    Get-ADUser -Filter * -SearchBase "OU=Staff,OU=UserAccounts,DC=FABRIKAM,DC=COM"- Properties * | Export-Csv -NoTypeInformation -Path Users report.csv

    Hope that helps.

     

     

     

Resources