src/PowerShell/Help/Microsoft.WinGet.Client/Test-WinGetUserSetting.md
Tests the current state of WinGet user settings.
Test-WinGetUserSetting -UserSettings <Hashtable> [-IgnoreNotSet] [<CommonParameters>]
This command tests the current state of WinGet user settings against a provided set of values.
Test-WinGetUserSetting -UserSettings @{
installBehavior = @{
preferences = @{
scope = 'user'
}
}
}
This example shows how to confirm that your current user settings match specific values. The
command returns $false if it is not an exact match.
Test-WinGetUserSetting -IgnoreNotSet -UserSettings @{
visual = @{
progressBar = 'rainbow'
}
}
This examples tests whether the progress bar theme is set to rainbow. When you use the
IgnoreNotSet parameter, the command only tests the provide values and doesn't include other
WinGet settings in the comparison.
When you use the IgnoreNotSet parameter, the command only tests the provide values and doesn't include other WinGet settings in the comparison.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
A hashtable containing the key value pairs representing the WinGet settings.
Type: System.Collections.Hashtable
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.