Announcement

Collapse
No announcement yet.

Problems w/ unlock user account script in Active Directory

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problems w/ unlock user account script in Active Directory

    I can't seem to get this script to run. It is supposed to allow me to right click on a user account and select "Unlock User". I am able to make it display" The user has been unlocked, but it actually doesn't. I am now receiving a "subscript out of range"(2,2) error when trying to run this script. I have added some spaces and downloaded a script editor but they are not much help to a person with little scripting experience. Can someone please help? Here is the script:

    Set wshArguments = WScript.Arguments
    Set Objuser = GetObject (wshArguments ( 0 ) )

    'Objuser'.put = "lockouttime","0"

    'Objuser'.setinfo

    msgbox "The user has been unlocked - "
    'Objuser'.sAMAccountName

    Any help would be greatly appreciated. Thank so much.

  • #2
    have a look at this one.. with a little bit of modification, it can help you out
    http://www.microsoft.com/technet/scr.../usstvb07.mspx
    Marcel
    Technical Consultant
    Netherlands
    http://www.phetios.com
    http://blog.nessus.nl

    MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
    "No matter how secure, there is always the human factor."

    "Enjoy life today, tomorrow may never come."
    "If you're going through hell, keep going. ~Winston Churchill"

    Comment

    Working...
    X