New-EntraADMAccount
SYNOPSIS
Creates a new Azure Active Directory account for a user based on an on-premises user.
SYNTAX
New-EntraADMAccount [-UserName] <String> [-UseOwnAADAuthentication] [-UseOwnExchangeAuthentication]
[<CommonParameters>]
DESCRIPTION
The `New-EntraADMAccount` function creates a new Azure Active Directory account for a user with a `user.azure@district09.gent` UPN. It retrieves the on-premises user details, connects to Azure AD using a service principal, and synchronizes the account with the necessary attributes. The function supports using custom authentication sessions for Azure AD and Exchange Online.
EXAMPLES
EXAMPLE 1
Creates a new Azure AD account for the on-premises user "jdoe" using the default authentication session.
EXAMPLE 2
Creates a new Azure AD account for the on-premises user "jdoe" using the user's own Azure AD authentication session.
EXAMPLE 3
Creates a new Azure AD account for the on-premises user "jdoe" using the user's own Exchange Online authentication session.
PARAMETERS
-UserName
The username of the on-premises user for whom the Azure AD account will be created.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-UseOwnAADAuthentication
A switch parameter that, when specified, uses the user's own Azure AD authentication session instead of the default service principal.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-UseOwnExchangeAuthentication
A switch parameter that, when specified, uses the user's own Exchange Online authentication session instead of the default service principal.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
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.