Add-WssUserGroupMembership
Add-WssUserGroupMembership
Adds a user account to a user group.
Syntax
Parameter Set: Default
Add-WssUserGroupMembership -GroupName <String> -UserName <String> [ <CommonParameters>]
Detailed Description
The Add-WssUserGroupMembership cmdlet adds a user account to a user group.
Parameters
-GroupName<String>
Specifies the name of a user group. The cmdlet adds a user account to 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 adds the account that you specify to a user 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: Add a user account to a user group
This command adds the user account named PattiFuller to the user group named Support.
PS C:\> Add-WssUserGroupMembership -GroupName "Support" -UserName "PattiFuller"