Ads 468x60px

Friday, 30 January 2015

Export User list set for PasswordNever Expire

Click on the below link, one of the best books to purchase and get started with Powershell scripting



Finding users whose password is set to never expiry.

To export the user's whose attributes are set for password never expiry through powershell cmdlets.

Please use the below commands.

Get-ADUser -Filter  'PasswordNeverExpires -eq $true'  -Server "domain name" | select name > c:\users.txt

Here we have used Get-aduser cmdlets and filter to show all users whose password is 
Set to enabled.
We’re piping the output with cmdlets “select-object” and to show the output with “Name” attribute.



Note:-
o   Run powershell  as administrator
o   Import-module activedirectory
o   Set-execution policy unrestricted  



0 comments:

Post a Comment