Test-WinGetUserSetting.md (2579B)
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: Test-WinGetUserSetting 8 --- 9 10 # Test-WinGetUserSetting 11 12 ## SYNOPSIS 13 Tests the current state of WinGet user settings. 14 15 ## SYNTAX 16 17 ``` 18 Test-WinGetUserSetting -UserSettings <Hashtable> [-IgnoreNotSet] [<CommonParameters>] 19 ``` 20 21 ## DESCRIPTION 22 23 This command tests the current state of WinGet user settings against a provided set of values. 24 25 ## EXAMPLES 26 27 ### Example 1: Test for exact match 28 29 ```powershell 30 Test-WinGetUserSetting -UserSettings @{ 31 installBehavior = @{ 32 preferences = @{ 33 scope = 'user' 34 } 35 } 36 } 37 ``` 38 39 This example shows how to confirm that your current user settings match specific values. The 40 command returns `$false` if it is not an exact match. 41 42 ### Example 2: Test only progress bar setting 43 44 ```powershell 45 Test-WinGetUserSetting -IgnoreNotSet -UserSettings @{ 46 visual = @{ 47 progressBar = 'rainbow' 48 } 49 } 50 ``` 51 52 This examples tests whether the progress bar theme is set to `rainbow`. When you use the 53 **IgnoreNotSet** parameter, the command only tests the provide values and doesn't include other 54 WinGet settings in the comparison. 55 56 ## PARAMETERS 57 58 ### -IgnoreNotSet 59 60 When you use the **IgnoreNotSet** parameter, the command only tests the provide values and doesn't 61 include other WinGet settings in the comparison. 62 63 ```yaml 64 Type: System.Management.Automation.SwitchParameter 65 Parameter Sets: (All) 66 Aliases: 67 68 Required: False 69 Position: Named 70 Default value: None 71 Accept pipeline input: True (ByPropertyName) 72 Accept wildcard characters: False 73 ``` 74 75 ### -UserSettings 76 77 A hashtable containing the key value pairs representing the WinGet settings. 78 79 ```yaml 80 Type: System.Collections.Hashtable 81 Parameter Sets: (All) 82 Aliases: 83 84 Required: True 85 Position: Named 86 Default value: None 87 Accept pipeline input: True (ByPropertyName) 88 Accept wildcard characters: False 89 ``` 90 91 ### CommonParameters 92 93 This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, 94 -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, 95 -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see 96 [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). 97 98 ## INPUTS 99 100 ### System.Collections.Hashtable 101 102 ### System.Management.Automation.SwitchParameter 103 104 ## OUTPUTS 105 106 ### System.Boolean 107 108 ## NOTES 109 110 ## RELATED LINKS 111 112 [Get-WinGetUserSetting](Get-WinGetUserSetting.md) 113 114 [Set-WinGetUserSetting](Set-WinGetUserSetting.md)