Update-MtPack
Synopsis
Section titled “Synopsis”Updates installed Maester Packs to their newest release that has met the cooldown, showing what changed.
Syntax
Section titled “Syntax”Update-MtPack [[-Id] <String[]>] [-Version <String>] [-PackLock <String>] [-AcceptRisk <String>] [-IncludeRecent] [-NonInteractive] [-Force] [-Token <SecureString>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]Description
Section titled “Description”Each pack is installed again from its source with the same checks as Install-MtPack: the cooldown, the pack policy, the blocklist and the scan. The approval shows what changed since the version you approved: new services, scopes, network hosts, modules and a higher risk. A pack whose newest release has the files you approved is left as it is, without asking again, and reported as UpToDate.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”Update-MtPackUpdates every pack installed from GitHub.
Example 2
Section titled “Example 2”Update-MtPack contoso.google-workspace -Version 1.3.0Updates one pack to a given release.
Example 3
Section titled “Example 3”Update-MtPack contoso.private-pack -Token (Get-Secret -Name PackReadToken)Updates a pack from a private repository with a token read from a secret vault.
Parameters
Section titled “Parameters”The packs to update. By default every pack installed from GitHub.
Type: String[]Parameter Sets: (All)Aliases:
Required: FalsePosition: 1Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Version
Section titled “-Version”The release to update to. Only with one -Id.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-PackLock
Section titled “-PackLock”The lock file to update. By default the one beside the Maester config found from the current folder, else the user’s.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-AcceptRisk
Section titled “-AcceptRisk”The highest risk a pack may have to be updated without asking: Low, Medium or High.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: LowAccept pipeline input: FalseAccept wildcard characters: False-IncludeRecent
Section titled “-IncludeRecent”Update to a release that is newer than the cooldown.
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-NonInteractive
Section titled “-NonInteractive”Never ask. Used automatically when the input is redirected.
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-Force
Section titled “-Force”Answer yes to the approval question.
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-Token
Section titled “-Token”A GitHub token that can read the pack’s repository, as a SecureString, for a private or internal
repository.
It is used for this command only, is sent to api.github.com only, and is not stored.
When it
is given, no other sign-in is tried.
Without it, Maester uses the first of these that can read the
repository: the sign-in of Connect-MtGitHub in this session, the GitHub CLI (gh auth token, when gh is
installed and signed in), then the GH_TOKEN and GITHUB_TOKEN environment variables.
An environment
variable can be read by every process and module in the session, including installed packs, so prefer
the other ways outside a pipeline.
A fine-grained token needs only read-only Contents access to the
one repository.
Type: SecureStringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept 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.