Restore-MtPack
SYNOPSIS
Installs exactly the packs and modules that maester-packs.lock.json records, on a new computer or in a pipeline.
SYNTAX
Restore-MtPack [[-Id] <String[]>] [-PackLock <String>] [-ProgressAction <ActionPreference>] [-WhatIf]
[-Confirm] [<CommonParameters>]
DESCRIPTION
For each pack in the lock file whose files are not in the local pack store, the recorded commit is fetched and its digest must equal the digest in the lock file; a pack whose files differ is not restored. Each module in the lock file is saved at its exact version and must match its recorded digest. Nothing is asked: the lock file is the approval, made when the pack was installed. A module that was externally managed when it was approved is not saved; it must be installed on this computer at the same version and with the same files.
Run it before Invoke-Maester in a pipeline that commits maester-config.json and maester-packs.lock.json.
EXAMPLES
EXAMPLE 1
Restore-MtPack
Restores every pack of the lock file found from the current folder.
EXAMPLE 2
Restore-MtPack -PackLock ./maester/maester-packs.lock.json; Invoke-Maester -Path ./maester
Restores, then runs, in a pipeline.
PARAMETERS
-Id
Restore only these packs. By default every pack in the lock file.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PackLock
The lock file to restore from. By default the one beside the Maester config found from the current folder, else the user's.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
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.