Remove User From Local Group

Removes a user from a local group.

Privileges

Elevated – Run as administrator

Input Parameters

Name Type Required Description
Group Name String Yes The name of the local group from which the user will be removed.
User Name String Yes Name of the user.
Domain String Yes The domain of the user.

Output Parameters

Name Type Description
Result Number Returns a success value of zero or any value other than zero to indicate failure.

Example Input Parameters

Name Type Required Example
Group Name String Yes Administrators
User Name String Yes Jsmith
Domain String Yes ABC.com Specify customer domain if you are removing a Domain User from the Local Group.
Computer_Name Specify computer name if removing Local User from Local Group.