Skip to content

Test-OnderwijsMailbox

SYNOPSIS

Test the existence of an Onderwijs mailbox in Office 365.

SYNTAX

Test-OnderwijsMailbox [-MailboxName] <String> [<CommonParameters>]

DESCRIPTION

The `Test-OnderwijsMailbox` function checks if a specified mailbox exists in the Onderwijs Gent Office 365 environment. If the mailbox is not found, it attempts to locate the mailbox using Active Directory attributes. The function returns the primary SMTP address of the mailbox if found, or an error message if not.

EXAMPLES

EXAMPLE 1

Test-OnderwijsMailbox -MailboxName "[email protected]"

Checks if the mailbox `user@onderwijs.gent.be` exists in the Onderwijs Gent Office 365 environment.

EXAMPLE 2

"[email protected]" | Test-OnderwijsMailbox

Checks if the mailbox `user@onderwijs.gent.be` exists in the Onderwijs Gent Office 365 environment.

PARAMETERS

-MailboxName

The name of the mailbox to be tested. Can be a UserPrincipalName or other identifying attribute.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
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