Skip to content

Latest commit

 

History

History
171 lines (130 loc) · 4.68 KB

Set-AzureAdUserLicenseServicePlan.md

File metadata and controls

171 lines (130 loc) · 4.68 KB
external help file Module Name online version schema
TeamsFunctions-help.xml
TeamsFunctions
2.0.0

Set-AzureAdUserLicenseServicePlan

SYNOPSIS

Changes one or more Service Plans for Licenses assigned to an AzureAD Object

SYNTAX

Set-AzureAdUserLicenseServicePlan [-UserPrincipalName] <String[]> [-Enable <String[]>] [-Disable <String[]>]
 [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Enables or disables a ServicePlan from all assigned Licenses to an AzureAD Object Supports all Service Plans listed in Get-AzureAdLicenseServicePlan

EXAMPLES

EXAMPLE 1

Set-AzureAdUserLicenseServicePlan [-UserPrincipalName] Name@domain.com -Enable MCOEV

Enables the Service Plan Phone System (MCOEV) on all Licenses assigned to Name@domain.com

EXAMPLE 2

Set-AzureAdUserLicenseServicePlan -UserPrincipalName Name@domain.com -Disable MCOEV,TEAMS1

Disables the Service Plans Phone System (MCOEV) and Teams (TEAMS1) on all Licenses assigned to Name@domain.com

EXAMPLE 3

Set-AzureAdUserLicenseServicePlan -UserPrincipalName Name@domain.com -Enable MCOEV,TEAMS1 -PassThru

Enables the Service Plans Phone System (MCOEV) and Teams (TEAMS1) on all Licenses assigned to Name@domain.com Displays User License Object after application

PARAMETERS

-UserPrincipalName

The UserPrincipalName, ObjectId or Identity of the Object.

Type: String[]
Parameter Sets: (All)
Aliases: ObjectId, Identity

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-Enable

Optional. Service Plans to be enabled (main function) Accepted Values are available with Intellisense and can be retrieved with Get-AzureAdLicenseServicePlan (Column ServicePlanName) No action is taken for any Licenses not containing this Service Plan

Type: String[]
Parameter Sets: (All)
Aliases:

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

-Disable

Optional. Service Plans to be disabled (alternative function) Accepted Values are available with Intellisense and can be retrieved with Get-AzureAdLicenseServicePlan (Column ServicePlanName) No action is taken for any Licenses not containing this Service Plan

Type: String[]
Parameter Sets: (All)
Aliases:

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

-PassThru

Optional. Displays User License Object after action.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String

OUTPUTS

System.Void - Default Behavior

System.Object - With Switch PassThru

NOTES

Data in Get-AzureAdLicenseServicePlan as per Microsoft Docs Article: Published Service Plan IDs for Licensing https://docs.microsoft.com/en-us/azure/active-directory/users-groups-roles/licensing-service-plan-reference#service-plans-that-cannot-be-assigned-at-the-same-time

RELATED LINKS

https://github.com/DEberhardt/TeamsFunctions/tree/main/docs/Set-AzureAdUserLicenseServicePlan.md

https://github.com/DEberhardt/TeamsFunctions/tree/main/docs/about_Licensing.md

https://github.com/DEberhardt/TeamsFunctions/tree/main/docs/about_UserManagement.md

https://github.com/DEberhardt/TeamsFunctions/tree/main/docs/