Get-MtGraphScope
SYNOPSIS
Section titled “SYNOPSIS”Returns the list of Graph scopes required to run Maester.
SYNTAX
Section titled “SYNTAX”Get-MtGraphScope [-SendMail] [-SendTeamsMessage] [-Privileged] [-IncludePreview] [-ProgressAction <ActionPreference>] [<CommonParameters>]DESCRIPTION
Section titled “DESCRIPTION”Use this cmdlet to connect to Microsoft Graph using Connect-MgGraph.
EXAMPLES
Section titled “EXAMPLES”EXAMPLE 1
Section titled “EXAMPLE 1”Connect-MgGraph -Scopes (Get-MtGraphScope)Connects to Microsoft Graph with the required scopes to run Maester.
EXAMPLE 2
Section titled “EXAMPLE 2”Connect-MgGraph -Scopes (Get-MtGraphScope -SendMail)Connects to Microsoft Graph with the required scopes to run Maester and send email.
EXAMPLE 3
Section titled “EXAMPLE 3”Connect-MgGraph -Scopes (Get-MtGraphScope -SendTeamsMessage)Connects to Microsoft Graph with the required scopes to run Maester and send messages to a Teams Channel.
EXAMPLE 4
Section titled “EXAMPLE 4”Connect-MgGraph -Scopes (Get-MtGraphScope -PrivilegedScopes)Connects to Microsoft Graph with the required scopes to run Maester for all tests, including those requiring read write APIs.
EXAMPLE 5
Section titled “EXAMPLE 5”Connect-MgGraph -Scopes (Get-MtGraphScope -IncludePreview)Connects to Microsoft Graph with the additional scopes required by preview tests.
PARAMETERS
Section titled “PARAMETERS”-SendMail
Section titled “-SendMail”If specified, the cmdlet will include the scope to send email (Mail.Send).
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-SendTeamsMessage
Section titled “-SendTeamsMessage”If specified, the cmdlet will include the scope to send Teams Channel Messages (ChannelMessage.Send).
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-Privileged
Section titled “-Privileged”If specified, the cmdlet will include the scope for read write endpoints.
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-IncludePreview
Section titled “-IncludePreview”If specified, the cmdlet will include scopes required by preview tests.
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-ProgressAction
Section titled “-ProgressAction”Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by Write-Progress.
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseCommonParameters
Section titled “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.