Scripts Thread, [Powershell] Administrator Account Expiry Script in Coding and Web Development; Hey all,
I was wondering if anyone has or could make and post a Powershell script here to set the ...
16th February 2012, 05:52 PM #1
- Rep Power
[Powershell] Administrator Account Expiry Script
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.
16th February 2012, 06:20 PM #2
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:
Set-QADUser -Identity <UserDN> -PasswordNeverExpires $true
Get-QADUser -Identity <someuser> | Set-QADUser -passwordNeverExpires $true
Maybe edit the 2nd line of code to :
get-content “c:\users.txt” | Set-QADUser -passwordNeverExpires $true
Last edited by mac_shinobi; 16th February 2012 at 06:22 PM.
Thanks to mac_shinobi from:
timethrow (16th February 2012)
By googlemad in forum Windows
Last Post: 6th October 2008, 11:13 AM
By disinfo in forum Windows
Last Post: 16th October 2006, 11:14 AM
By tosca925 in forum Windows
Last Post: 3rd July 2006, 06:02 PM
By Gatt in forum Windows Vista
Last Post: 2nd April 2006, 10:51 AM
By richard in forum How do you do....it?
Last Post: 11th March 2006, 11:36 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)