From b41cdbdbdad874fd8a51e76d558859c2d006f758 Mon Sep 17 00:00:00 2001 From: Rain Sallow Date: Tue, 22 Oct 2024 10:08:50 -0400 Subject: [PATCH] (doc) Update cmdlet docs for ShouldProcess support As we're adding this support into the CLI helper commands that have been rewritten, we need to update our documentation to reflect this as well. --- .../create/cmdlets/Install-ChocolateyPath.mdx | 32 ++++++++++++++++++- .../cmdlets/Set-EnvironmentVariable.mdx | 32 ++++++++++++++++++- .../cmdlets/Uninstall-ChocolateyPath.mdx | 32 ++++++++++++++++++- .../cmdlets/Update-SessionEnvironment.mdx | 32 ++++++++++++++++++- 4 files changed, 124 insertions(+), 4 deletions(-) diff --git a/src/content/docs/en-us/create/cmdlets/Install-ChocolateyPath.mdx b/src/content/docs/en-us/create/cmdlets/Install-ChocolateyPath.mdx index 986086973a..22d41aaeaf 100644 --- a/src/content/docs/en-us/create/cmdlets/Install-ChocolateyPath.mdx +++ b/src/content/docs/en-us/create/cmdlets/Install-ChocolateyPath.mdx @@ -22,7 +22,7 @@ This puts a directory to the PATH environment variable. ``` Install-ChocolateyPath [-Path] [[-PathType] ] - [-IgnoredArguments ] [] + [-IgnoredArguments ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -92,6 +92,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +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. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). diff --git a/src/content/docs/en-us/create/cmdlets/Set-EnvironmentVariable.mdx b/src/content/docs/en-us/create/cmdlets/Set-EnvironmentVariable.mdx index 64aa39fb44..1629ba5fac 100644 --- a/src/content/docs/en-us/create/cmdlets/Set-EnvironmentVariable.mdx +++ b/src/content/docs/en-us/create/cmdlets/Set-EnvironmentVariable.mdx @@ -22,7 +22,7 @@ DO NOT USE. Not part of the public API. Use `Install-ChocolateyEnvironmentVariab ``` Set-EnvironmentVariable [-Name] [[-Value] ] [[-Scope] ] - [-IgnoredArguments ] [] + [-IgnoredArguments ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -100,6 +100,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +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. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). diff --git a/src/content/docs/en-us/create/cmdlets/Uninstall-ChocolateyPath.mdx b/src/content/docs/en-us/create/cmdlets/Uninstall-ChocolateyPath.mdx index f1d0f33fb2..704966fc54 100644 --- a/src/content/docs/en-us/create/cmdlets/Uninstall-ChocolateyPath.mdx +++ b/src/content/docs/en-us/create/cmdlets/Uninstall-ChocolateyPath.mdx @@ -22,7 +22,7 @@ This puts a directory to the PATH environment variable. ``` Uninstall-ChocolateyPath [-Path] [[-PathType] ] - [-IgnoredArguments ] [] + [-IgnoredArguments ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -92,6 +92,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +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. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). diff --git a/src/content/docs/en-us/create/cmdlets/Update-SessionEnvironment.mdx b/src/content/docs/en-us/create/cmdlets/Update-SessionEnvironment.mdx index fa6f9b347f..6c418111b2 100644 --- a/src/content/docs/en-us/create/cmdlets/Update-SessionEnvironment.mdx +++ b/src/content/docs/en-us/create/cmdlets/Update-SessionEnvironment.mdx @@ -18,7 +18,7 @@ Updates the environment variables of the current powershell session with any env ## SYNTAX ``` -Update-SessionEnvironment [-IgnoredArguments ] [] +Update-SessionEnvironment [-IgnoredArguments ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -54,6 +54,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +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. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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).