Remove-WssUserGroupMembership

Remove-WssUserGroupMembership

Removes a user from a user group.

Syntax

Parameter Set: Default
Remove-WssUserGroupMembership -GroupName <String> -UserName <String> [ <CommonParameters>]

Detailed Description

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

Parameters

-GroupName<String>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UserName<String>

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Remove a user from a group

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

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

Add-WssUserGroupMembership