winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

Set-WinGetUserSetting.md (2850B)


      1 ---
      2 external help file: Microsoft.WinGet.Client.Cmdlets.dll-Help.xml
      3 Module Name: Microsoft.WinGet.Client
      4 ms.date: 08/01/2024
      5 online version:
      6 schema: 2.0.0
      7 title: Set-WinGetUserSetting
      8 ---
      9 
     10 # Set-WinGetUserSetting
     11 
     12 ## SYNOPSIS
     13 Sets configuration settings of the WinGet client for the current user.
     14 
     15 ## SYNTAX
     16 
     17 ```
     18 Set-WinGetUserSetting -UserSettings <Hashtable> [-Merge] [<CommonParameters>]
     19 ```
     20 
     21 ## DESCRIPTION
     22 
     23 This command sets configuration settings of the WinGet client for the current user. The user
     24 settings file doesn't exist until you set a specific value. The file is stored in
     25 `$env:LOCALAPPDATA\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json`.
     26 For more information about WinGet settings, see
     27 [WinGet CLI Settings](https://aka.ms/winget-settings).
     28 
     29 ## EXAMPLES
     30 
     31 ### Example 1: Set progress bar theme
     32 
     33 ```powershell
     34 Set-WinGetUserSetting -UserSettings @{
     35     visual = @{
     36         progressBar = 'rainbow'
     37     }
     38 }
     39 ```
     40 
     41 Sets the theme of the progress bar to rainbow.
     42 
     43 ### Example 2: Merge install behavior settings
     44 
     45 ```powershell
     46 Set-WinGetUserSetting  -Merge -UserSettings @{
     47     installBehavior = @{
     48         preferences = @{
     49             scope = 'user'
     50         }
     51     }
     52 }
     53 ```
     54 
     55 Appends the user scope preference setting to the existing WinGet settings configuration.
     56 
     57 ### Example 3: Change multiple settings
     58 
     59 ```powershell
     60 Set-WinGetUserSetting -UserSettings @{
     61     visual = @{
     62         progressBar = 'rainbow'
     63         anonymizeDisplayedPaths = $true
     64     }
     65 }
     66 ```
     67 
     68 ## PARAMETERS
     69 
     70 ### -Merge
     71 
     72 By default, the command overwrites the current setting with the values provided. Use this parameter
     73 to append the new settings to the existing configuration.
     74 
     75 ```yaml
     76 Type: System.Management.Automation.SwitchParameter
     77 Parameter Sets: (All)
     78 Aliases:
     79 
     80 Required: False
     81 Position: Named
     82 Default value: None
     83 Accept pipeline input: True (ByPropertyName)
     84 Accept wildcard characters: False
     85 ```
     86 
     87 ### -UserSettings
     88 
     89 A hashtable containing the key value pairs representing the WinGet settings.
     90 
     91 ```yaml
     92 Type: System.Collections.Hashtable
     93 Parameter Sets: (All)
     94 Aliases:
     95 
     96 Required: True
     97 Position: Named
     98 Default value: None
     99 Accept pipeline input: True (ByPropertyName)
    100 Accept wildcard characters: False
    101 ```
    102 
    103 ### CommonParameters
    104 
    105 This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
    106 -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable,
    107 -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
    108 [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
    109 
    110 ## INPUTS
    111 
    112 ### System.Collections.Hashtable
    113 
    114 ### System.Management.Automation.SwitchParameter
    115 
    116 ## OUTPUTS
    117 
    118 ### System.Collections.Hashtable
    119 
    120 ## NOTES
    121 
    122 ## RELATED LINKS
    123 
    124 [Get-WinGetUserSetting](Get-WinGetUserSetting.md)
    125 
    126 [Test-WinGetUserSetting](Test-WinGetUserSetting.md)