daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Mar 25th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. GroupName = InputBox("Enter group:","Unblock account","")
  2.  
  3. DomainController = "flight"
  4.  
  5. Set objGroup = GetObject("WinNT://" & DomainController & "/" & GroupName)
  6.  
  7. For Each Member in objGroup.Members
  8.  
  9.     If Member.Class = "User" Then
  10.         If Member.IsAccountLocked = TRUE Or Member.AccountDisabled = TRUE Then
  11.             Wscript.Echo(Member.Name & " has been locked. It unlock now")
  12.             Member.IsAccountLocked = FALSE
  13.             Member.AccountDisabled = FALSE
  14.             Member.SetInfo
  15.         End If
  16.     End If
  17. Next
  18.  
  19. Wscript.Echo("All users in " & GroupName & " are unlocked now")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top