Skip to main content

Test-MtConnection

SYNOPSIS

Checks if the current session is connected to the specified service. Use -Verbose to see the connection status for each service.

SYNTAX

Test-MtConnection [[-Service] <String[]>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Tests the connection for each service and returns $true if the session is connected to the specified service.

EXAMPLES

EXAMPLE 1

Test-MtConnection

Checks if the current session is connected to Microsoft Graph.

EXAMPLE 2

Test-MtConnection -Service All

Checks if the current session is connected to all services including Azure, Exchange and Microsoft Graph.

PARAMETERS

-Service

Checks if the current session is connected to the specified service

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

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

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

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

https://maester.dev/docs/commands/Test-MtConnection