timethrow Posted February 16, 2012 Posted February 16, 2012 Hey all, I was wondering if anyone has or could make and post a Powershell script here to set the Administrator Accounts Password Expiry on Windows Server 2008 R2 to Never Expire. If someone could post one that I could use and or adapt it would be brilliant. Thanks
mac_shinobi Posted February 16, 2012 Posted February 16, 2012 (edited) If you don't have that many admin accounts on AD, you can list them in a text file and do the below Powershell to set AD user password to never Expire - Powershell.com So, to prevent a user's password from expiring using the Quest AD cmdlets, use the following: [color=#666666][font=Arial]Set-QADUser -Identity -PasswordNeverExpires $true[/font][/color] [color=#666666][font=Arial]or[/font][/color] [color=#666666][font=Arial]Get-QADUser -Identity | Set-QADUser -passwordNeverExpires $true [/font][/color] Maybe edit the 2nd line of code to : [color=#666666][font=Arial] get-content “c:\users.txt” [/font][/color][color=#666666][font=Arial]| Set-QADUser -passwordNeverExpires $true [/font][/color] Edited February 16, 2012 by mac_shinobi 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now