+ 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
    Location
    somewhere
    Posts
    23
    Thank Post
    28
    Thanked 4 Times in 3 Posts
    Rep Power
    0

    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.

    Thanks

  2. #2

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,705
    Thank Post
    3,239
    Thanked 1,045 Times in 967 Posts
    Rep Power
    363
    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:
    Code:
    Set-QADUser -Identity <UserDN> -PasswordNeverExpires $true
    or
    Get-QADUser -Identity <someuser> | Set-QADUser -passwordNeverExpires $true
    

    Maybe edit the 2nd line of code to :
    Code:
     get-content “c:\users.txt” | Set-QADUser -passwordNeverExpires $true
    
    Last edited by mac_shinobi; 16th February 2012 at 05:22 PM.

  3. Thanks to mac_shinobi from:

    timethrow (16th February 2012)

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 1
    Last Post: 6th October 2008, 10:13 AM
  2. types of administrator account
    By disinfo in forum Windows
    Replies: 21
    Last Post: 16th October 2006, 10:14 AM
  3. Renaming the Administrator Account
    By tosca925 in forum Windows
    Replies: 20
    Last Post: 3rd July 2006, 05:02 PM
  4. Administrator Account
    By Gatt in forum Windows Vista
    Replies: 0
    Last Post: 2nd April 2006, 09: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, 10: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
  •