Skip to content

Set-EntraLicenseType

SYNOPSIS

Updates the license type for a user in Azure Active Directory.

SYNTAX

Set-EntraLicenseType [-User] <Object> [[-Licensetype] <String>] [-Mailbox] [[-SRParams] <PSObject>]
 [-ReportOnly] [<CommonParameters>]

DESCRIPTION

The `Set-EntraLicenseType` function updates the `ExtensionAttribute6` attribute for a user based on criteria such as entity, department, and whether the user has a full or soft account. This determines the user's inclusion in the correct Azure AD dynamic group. The function supports reporting-only mode and integration with HEAT for additional user data.

EXAMPLES

EXAMPLE 1

Set-EntraLicenseType -User "[email protected]" -Licensetype "E3" -Mailbox

Assigns an E3 license to the user "cloud.testuser@stad.gent" with a mailbox.

EXAMPLE 2

Set-EntraLicenseType -User "[email protected]" -Licensetype "EXO_P1" -ReportOnly

Runs the function in reporting mode to check the expected license type for the user "cloud.testuser@stad.gent".

EXAMPLE 3

Set-EntraLicenseType -User "[email protected]" -SRParams $ServiceRequestParams

Updates the license type for the user based on the provided service request parameters.

PARAMETERS

-User

The UserPrincipalName, DistinguishedName, or sAMAccountName of the user whose license type will be updated.

Type: Object
Parameter Sets: (All)
Aliases: UserPrincipalName, DN, DistinguishedName, sAMAccountName

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

-Licensetype

The license type to assign to the user. Supported values include: - E1 - E3 - F3 - EXO_P1 - EXO_P2

Type: String
Parameter Sets: (All)
Aliases:

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

-Mailbox

A switch parameter that, when specified, indicates whether the user requires a mailbox.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-SRParams

A custom object containing parameters from a service request, used to determine the license type.

Type: PSObject
Parameter Sets: (All)
Aliases:

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

-ReportOnly

A switch parameter that, when specified, runs the function in reporting mode without making changes.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: False
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

OUTPUTS

NOTES