Skip to content

Connect-Ex365

SYNOPSIS

Connect to Exchange Online with optional credentials and environment-specific settings.

SYNTAX

Connect-Ex365 [[-Credential] <PSCredential>] [-onderwijs] [[-CmdletsToLoad] <String[]>] [[-Prefix] <String>]
 [-NoPrefix] [<CommonParameters>]

DESCRIPTION

The `Connect-Ex365` function establishes a connection to Exchange Online. It supports connecting to different environments, such as the Onderwijs Gent environment, and allows the use of stored credentials from PasswordState. The function can also load specific cmdlets based on the provided parameters.

EXAMPLES

EXAMPLE 1

Connect-Ex365

Connects to Exchange Online using default credentials retrieved from PasswordState.

EXAMPLE 2

Connect-Ex365 -Credential (Get-Credential)

Connects to Exchange Online using the specified credentials.

EXAMPLE 3

Connect-Ex365 -Onderwijs

Connects to the Onderwijs Gent Exchange Online environment using stored credentials.

EXAMPLE 4

Connect-Ex365 -CmdletsToLoad @('Get-Mailbox', 'Set-Mailbox')

Connects to Exchange Online and loads only the specified cmdlets.

PARAMETERS

-Credential

The credentials to use for authentication. If not provided, the function retrieves credentials from PasswordState.

Type: PSCredential
Parameter Sets: (All)
Aliases:

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

-onderwijs

A switch to indicate that the connection is for the Onderwijs Gent environment.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-CmdletsToLoad

An array of cmdlets to load during the connection. Defaults to '*'.

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

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

-Prefix

{{ Fill Prefix Description }}

Type: String
Parameter Sets: (All)
Aliases:

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

-NoPrefix

{{ Fill NoPrefix Description }}

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
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