Skip to content

Set-ChocolateySetting

SYNOPSIS

Set or unset a Chocolatey Setting

SYNTAX

Set

Set-ChocolateySetting -Name <String> -Value <String> [-WhatIf] [-Confirm] [<CommonParameters>]

Unset

Set-ChocolateySetting -Name <String> [-Unset] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Allows you to set or unset the value of a Chocolatey setting usually accessed by choco config set -n=bob value

EXAMPLES

EXAMPLE 1

Set-ChocolateySetting -Name 'cacheLocation' -value 'C:\Temp\Choco'

PARAMETERS

-Name

Name (or setting) of the Chocolatey setting to modify

Type: System.String
Parameter Sets: (All)
Aliases: Setting

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Value

Value to be given on the setting. This is not available when the switch -Unset is used.

Type: System.String
Parameter Sets: Set
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Unset

Unset the setting, returning to the Chocolatey defaults.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: Unset
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: System.Management.Automation.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: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf

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.

INPUTS

OUTPUTS

System.Void

NOTES

https://github.com/chocolatey/choco/wiki/CommandsConfig

Back to top