Get-MtTest
SYNOPSIS
Lists Maester native tests and their metadata without connecting to a tenant.
SYNTAX
Get-MtTest [[-Id] <String[]>] [-Tag <String[]>] [-Product <String[]>] [-Feature <String[]>] [-Area <String[]>]
[-Severity <String[]>] [-Suite <String[]>] [-Path <String>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
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
EXAMPLE 1
Get-MtTest -Product entra -Severity High | Format-Table Id, Title, Feature, Area
Lists the built-in Entra ID tests of high severity. The values of one selector are alternatives; different selectors must all match.
EXAMPLE 2
Get-MtTest -Path ./Custom | Where-Object { -not $_.IsValid } | Select-Object -ExpandProperty Errors
Shows every problem in the custom tests.
PARAMETERS
-Id
Only tests with these IDs: exact IDs or '*' wildcards.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Tag
Only 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: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-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: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Feature
Only tests about these features of a product, for example conditional-access.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Area
Only tests of these security areas, for example authentication.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Severity
Only tests with these severities: Critical, High, Medium, Low or Info.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Suite
Only tests of these suites, for example Maester, CISA or AD.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Path
A Test.<ID>.ps1 file or a folder of them to validate.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-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: 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.