# Test-MtPack

Checks a Maester Pack folder the way Install-MtPack does, without installing it or running any of its code.

Source: https://maester.dev/docs/commands/Test-MtPack

## SYNOPSIS

Checks a Maester Pack folder the way Install-MtPack does, without installing it or running any of its code.

## SYNTAX

```powershell
Test-MtPack [[-Path] <String>] [-Official] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```

## DESCRIPTION

Use it while writing a pack, and in the pack's own CI.
It reads maester-pack.json, every file and every
test, and reports what would stop the pack from being installed (Errors), what an installer is told
(Warnings and Findings), the risk the install prompt shows, the test IDs and the digest that the lock
file would record.
IsValid is $false when there is an error.

## EXAMPLES

### EXAMPLE 1

```powershell
Test-MtPack ./my-pack
```

Shows whether the pack can be installed, and why not.

### EXAMPLE 2

```powershell
if (-not (Test-MtPack).IsValid) { exit 1 }
```

In a pack repository's CI.

## PARAMETERS

### -Path

The pack folder, the one that holds maester-pack.json.
The current folder by default.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: .
Accept pipeline input: False
Accept wildcard characters: False
```

### -Official

Check it as a pack from the maester365 organisation, which may use the names reserved for Maester.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
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.

```yaml
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](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

## OUTPUTS

### System.Management.Automation.PSObject

## NOTES

## RELATED LINKS

[https://maester.dev/docs/commands/Test-MtPack](https://maester.dev/docs/commands/Test-MtPack)
