src/PowerShell/Help/Microsoft.WinGet.Client/Repair-WinGetPackageManager.md
Repairs the installation of the WinGet client on your computer.
Repair-WinGetPackageManager [-AllUsers] [-Force] [-Version <String>] [-IncludePreRelease] [<CommonParameters>]
Repair-WinGetPackageManager [-AllUsers] [-Force] [-Latest] [-IncludePreRelease]
[<CommonParameters>]
This command repairs the installation of the WinGet client on your computer by installing the specified version or the latest version of the client. This command can also install the WinGet client if it is not already installed on your machine. It ensures that the client is installed in a working state.
Repair-WinGetPackageManager
Ensures that the current installed version of WinGet is functioning properly.
Repair-WinGetPackageManager -Latest -Force
This example shows how to repair they WinGet client by installing the latest version and ensuring it functions properly. The Force parameter shuts down the version that is currently running so that it can update the application files.
Repair-WinGetPackageManager -Version "1.12.*" -Force
This example shows how to repair the WinGet client by installing a version that matches the specified version pattern. The Force parameter shuts down the version that is currently running so that it can update the application files.
Use this parameter to repair the WinGet client for all user accounts on the computer. The command must run the command with administrator permissions.
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
The Force parameter shuts down the version that is currently running so that it can update the application files.
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
Use this parameter to include prerelease versions of the WinGet client.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: IntegrityLatestSet
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Use this parameter to install the latest available version of the WinGet client.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: IntegrityLatestSet
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the version of the WinGet client to install or repair. You can provide an exact version number or use wildcard characters (for example, "1.*.1*") to match and install the latest version that fits the pattern.
Type: System.String
Parameter Sets: IntegrityVersionSet
Aliases:
Required: False
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.