Skip to content

Local Group Remove All Except

Removes all members from a local group except those whose account name matches one or more wildcard patterns.

Required

Specifies the local group name or SID to clean up. For example: Administrators or S-1-5-32-544. The SID works on every language. If the group is not found, the brick fails.

Required — Default: *Administrator

Specify one or more wildcard patterns for accounts that should remain in the group. Patterns are matched against the full account name as returned by the system (e.g. DOMAIN\Username or .\Username). Use Username to match regardless of domain, or DOMAIN\ to keep all accounts from a specific domain. Allowed values: *Administrator, *Domain Admins.

  • Category: User management
  • Brick ID: UsrMgr-LocalGroup-RemoveAllExcept