Set-WssMsoUserLicense
Assigns licenses to an account in aad_2.
Syntax
Set-WssMsoUserLicense
[-WssUserName] <String>
[[-License] <MSOLicense[]>]
[<CommonParameters>]
Description
The Set-WssMsoUserLicense cmdlet assigns licenses to an online service account in aad_1.
Examples
Example 1: Store a license for a user
PS C:\> $Subscribe = Get-WssMsoSubscription
PS C:\> Set-WssMSOUserLicense -WssUserName "EvanNarvaez" -License $Subscribe.MSOLicenseSuite[0].MSOLicense
The first command uses the Get-WssMsoSubscription cmdlet to get subscription information, and then stores it in the $Subscribe variable.
The second command assigns a license, contained in the object stored in the $Subscribe variable, to the account named EvanNarvaez. The command uses standard array notation to access the first member of the MSOLicenseSuite array, and refer to the associated MSOLicense object.
Parameters
-License
Specifies an array of licenses as MSOLicense objects. The cmdlet assigns the licenses that you specify to a user account. To obtain MSOLicense objects, use the Get-WssMsoSubscription cmdlet to get subscription information. Subscription information contains the MSOLicenseSuite array that refers to MSOLicense objects.
Type: | MSOLicense[] |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WssUserName
Specifies the name of the user account to which you want the licenses assigned.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
WssUserName Type: System.String Description: local network account name of user
Related Links
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for