New-OnderwijsContact
SYNOPSIS
Create a new mail contact for the "onderwijs.gent.be" domain.
SYNTAX
DESCRIPTION
The `New-OnderwijsContact` function creates a new mail contact for the "onderwijs.gent.be" domain. It validates the specified user, retrieves the corresponding mailbox information, and ensures the contact does not already exist. The function also sets custom attributes, organizational details, and logs the creation task.
EXAMPLES
EXAMPLE 1
New-OnderwijsContact -Identity "[email protected]" -tasknumber 12345
Creates a new mail contact for the user `user@example.com` and logs the action with task number 12345.
PARAMETERS
-Identity
The identity of the user (e.g., UserPrincipalName, DistinguishedName, or SamAccountName) for whom the mail contact will be created.
Type: String
Parameter Sets: (All)
Aliases: UserPrincipalName, DistinguishedName, Samaccountname
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-tasknumber
The task number associated with the creation of the mail contact, used for logging purposes.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: 0
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.