+ Post New Thread
Results 1 to 2 of 2
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 ...
  1. #1

    Join Date
    Nov 2009
    Thank Post
    Thanked 4 Times in 3 Posts
    Rep Power

    Cool [Powershell] Administrator Account Expiry Script

    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.


  2. #2

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Thank Post
    Thanked 1,123 Times in 1,025 Posts
    Rep Power
    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.

  3. Thanks to mac_shinobi from:

    timethrow (16th February 2012)

+ Post New Thread

Similar Threads

  1. Replies: 1
    Last Post: 6th October 2008, 11:13 AM
  2. types of administrator account
    By disinfo in forum Windows
    Replies: 21
    Last Post: 16th October 2006, 11:14 AM
  3. Renaming the Administrator Account
    By tosca925 in forum Windows
    Replies: 20
    Last Post: 3rd July 2006, 06:02 PM
  4. Administrator Account
    By Gatt in forum Windows Vista
    Replies: 0
    Last Post: 2nd April 2006, 10:51 AM
  5. Allow non-administrator accounts to unlock a pc
    By richard in forum How do you do....it?
    Replies: 17
    Last Post: 11th March 2006, 11:36 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts