Get-MtTest
SYNOPSIS
Lists Maester native tests and their metadata without connecting to a tenant.
SYNTAX
Get-MtTest [[-Id] <String[]>] [-Tag <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 -Tag CA | Format-Table Id, Title, Severity
Lists the built-in Conditional Access tests.
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 carry any of these tags.
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.