Remove-WssUserGroupMembership

Removes a user from a user group.

Syntax

Remove-WssUserGroupMembership
      -GroupName <String>
      -UserName <String>
      [<CommonParameters>]

Description

The Remove-WssUserGroupMembership cmdlet removes a user account from a user group.

Examples

Example 1: Remove a user from a group

PS C:\> Remove-WssUserGroupMembership -GroupName "HRGroup" -UserName "EvanNarvaez"

This command removes the account named EvanNarvaez from the user group named HRGroup.

1:

PS C:\>

Parameters

-GroupName

Specifies the name of a user group. The cmdlet removes a user account from the group that you specify.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-UserName

Specifies the name of a user account. The cmdlet removes the account that you specify from a group.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False