New-MtPack
Synopsis
Section titled “Synopsis”Creates a new Maester Pack folder: maester-pack.json, a suite with a first test, and optionally a connector.
Syntax
Section titled “Syntax”New-MtPack [-Path] <String> -Id <String> -Code <String> [-Name <String>] [-Connector] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]Description
Section titled “Description”A pack is a folder, usually a GitHub repository, that others install with Install-MtPack. This writes its manifest, a README, a tests folder with suite.json and a first test MP.<Code>.1001, and with -Connector a connector for a service of your own and a helper that reads its connection.
Check it with Test-MtPack, and run its tests with Invoke-MtTest -Path. Publish it by pushing the folder to GitHub under the publisher’s account and creating a release.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”New-MtPack -Path ./maester-google-workspace -Id contoso.google-workspace -Code CNT -ConnectorCreates a pack with a connector for the service CNT.GoogleWorkspace.
Parameters
Section titled “Parameters”The folder to create. It must be empty or not exist.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: 1Default value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseThe pack ID, ‘<publisher>.<name>’ in lower case, for example contoso.google-workspace. The publisher is the GitHub user or organisation that will own the pack’s repository.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseThe pack’s code, which starts every test ID of the pack: CONTOSO for MP.CONTOSO.1001. Two to ten letters or digits, starting with a letter. A publisher with several packs can group them with up to three parts separated by dots, such as CNT.GWS for MP.CNT.GWS.1001. No two installed packs may share a code, or have one code that starts with the other.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseThe pack’s display name. By default made from its ID.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Connector
Section titled “-Connector”Also write a connector, so the pack can connect to a service Maester does not know.
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-WhatIf
Section titled “-WhatIf”Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameterParameter Sets: (All)Aliases: wi
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Confirm
Section titled “-Confirm”Prompts you for confirmation before running the cmdlet.
Type: SwitchParameterParameter Sets: (All)Aliases: cf
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.