Skip to main content

Connect-Maester

SYNOPSIS

Helper method to connect to Microsoft Graph using Connect-MgGraph with the required scopes.

SYNTAX

Connect-Maester [-SendMail] [-UseDeviceCode] [[-Environment] <String>] [[-AzureEnvironment] <String>]
[[-ExchangeEnvironmentName] <String>] [[-Service] <String[]>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]

DESCRIPTION

Use this cmdlet to connect to Microsoft Graph using Connect-MgGraph.

This command is completely optional if you are already connected to Microsoft Graph using Connect-MgGraph with the required scopes.

Connect-MgGraph -Scopes (Get-MtGraphScope)

EXAMPLES

EXAMPLE 1

Connect-Maester

EXAMPLE 2

Connect-Maester -Service All

EXAMPLE 3

Connect-Maester -Service Azure,Graph

PARAMETERS

-SendMail

If specified, the cmdlet will include the scope to send email (Mail.Send).

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-UseDeviceCode

If specified, the cmdlet will use the device code flow to authenticate.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Environment

The environment to connect to. Default is Global.

Type: String
Parameter Sets: (All)
Aliases:

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

-AzureEnvironment

The Azure environment to connect to. Default is AzureCloud.

Type: String
Parameter Sets: (All)
Aliases:

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

-ExchangeEnvironmentName

The Exchange environment to connect to. Default is O365Default.

Type: String
Parameter Sets: (All)
Aliases:

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

-Service

The services to connect to such as Azure and EXO. Default is Graph.

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

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