Update-MaesterTests
Synopsis
Section titled “Synopsis”Removes copies of the built-in Maester tests from a folder.
Syntax
Section titled “Syntax”Update-MaesterTests [[-Path] <String>] [-Force] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]Description
Section titled “Description”From Maester 3.0 the tests that ship with Maester run from the module itself. Copies of them that Install-MaesterTests wrote in Maester 2.x are not run any more. Update-MaesterTests removes those copies: every *.Tests.ps1 file outside a Custom folder whose tests all have the ID of a current, previous or retired built-in test. Files with any other test, and everything under custom/, are kept.
A maester-config.json that is a copy of the file Maester 2.x shipped is reduced to the settings that differ from the built-in defaults.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”Update-MaesterTests -Path ./tests -WhatIfLists the files that would be removed.
Example 2
Section titled “Example 2”Update-MaesterTests -Path ./tests -ForceRemoves the copies without asking.
Parameters
Section titled “Parameters”The folder to clean up. Defaults to the current directory.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 1Default value: .Accept pipeline input: FalseAccept wildcard characters: False-Force
Section titled “-Force”Does not ask for confirmation.
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-WhatIfNew in 3.0Preview 3.0
Section titled “-WhatIfNew in 3.0Preview 3.0”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-ConfirmNew in 3.0Preview 3.0
Section titled “-ConfirmNew in 3.0Preview 3.0”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.