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.