' borfpurge.vbs: Removes all users from the Borf Time Lockout security group. ' ' WARNING: VBscript does not know about system constants or object typing. ' ' Disallow implicit declarations. Option Explicit ' Set the error handler. Note that this is the only handler that VBScript supports. On Error Resume Next ' The Active Directory root in which localhost is participating. Dim borfRoot ' The LDAP domain name. Dim borfDomain ' The group object for the lockout group. Dim borfLockoutGroup ' The user object buffer. Dim borfUser ' Load the root object. Set borfRoot = GetObject( "LDAP://RootDSE" ) ' Load the domain name. borfDomain = borfRoot.Get( "DefaultNamingContext" ) ' Load the lockout group. Set borfLockoutGroup = GetObject( "LDAP://cn=Borf Time Lockout,cn=Users," + borfDomain ) ' Ensure that we only change user accounts. borfLockoutGroup.Members.Filter = Array( "user" ) ' Purge all group members. For Each borfUser In borfLockoutGroup.Members borfLockoutGroup.Remove( borfUser.ADsPath ) Next ' Ensure that the group object is released. Set borfLockoutGroup = Nothing ' eof