Set objOU = GetObject("LDAP://TestDC/OU=TestUO,DC=Test,DC=com") Set objUser = GetObject("LDAP://CN=TempUser,OU=TestOU,DC=Test,DC=com") objUser.AccountDisabled = FALSE objUser.SetInfo Wscript.echo "Successfully enabled TempUser from Test.Com" |
---|
Note: Before executing above script please make sure that the user with samaccount name TempUser exist in the domain and OU with name TestOU exists under Test.Com root container.
No comments:
Post a Comment