Get-MtTest
Synopsis
Section titled “Synopsis”Lists Maester native tests and their metadata without connecting to a tenant.
Syntax
Section titled “Syntax”Get-MtTest [[-Id] <String[]>] [-Tag <String[]>] [-Product <String[]>] [-Feature <String[]>] [-Area <String[]>] [-Severity <String[]>] [-Suite <String[]>] [-Path <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]Description
Section titled “Description”Without -Path, returns the tests that ship with Maester (the catalog). With -Path, reads the native tests (Test.<ID>.ps1) in a file or folder and validates them; each object’s Errors property lists every problem with its line, and IsValid is $false when there is one. No test code is run.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”Get-MtTest -Product entra -Severity High | Format-Table Id, Title, Feature, AreaLists the built-in Entra ID tests of high severity. The values of one selector are alternatives; different selectors must all match.
Example 2
Section titled “Example 2”Get-MtTest -Path ./Custom | Where-Object { -not $_.IsValid } | Select-Object -ExpandProperty ErrorsShows every problem in the custom tests.
Parameters
Section titled “Parameters”Only tests with these IDs: exact IDs or ’*’ wildcards.
Type: String[]Parameter Sets: (All)Aliases:
Required: FalsePosition: 1Default value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseOnly tests that any of these tags select: a tag the test carries or, for a test that ships with Maester, its ID or one of the tags it carried in Maester 2.x.
Type: String[]Parameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Product
Section titled “-Product”Only tests of these products: keys such as entra, or an alias such as ‘Entra ID’. Matches a test’s Product or any of its RelatedProduct values. ’*’ wildcards are allowed.
Type: String[]Parameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Feature
Section titled “-Feature”Only tests about these features of a product, for example conditional-access.
Type: String[]Parameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseOnly tests of these security areas, for example authentication.
Type: String[]Parameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Severity
Section titled “-Severity”Only tests with these severities: Critical, High, Medium, Low or Info.
Type: String[]Parameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Suite
Section titled “-Suite”Only tests of these suites, for example Maester, CISA or AD.
Type: String[]Parameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseA Test.<ID>.ps1 file or a folder of them to validate.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept 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.