winget-cli

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

Repair-WinGetPackageManager.md (3726B)


      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: Repair-WinGetPackageManager
      8 ---
      9 
     10 # Repair-WinGetPackageManager
     11 
     12 ## SYNOPSIS
     13 Repairs the installation of the WinGet client on your computer.
     14 
     15 ## SYNTAX
     16 
     17 ### IntegrityVersionSet (Default)
     18 
     19 ```
     20 Repair-WinGetPackageManager [-AllUsers] [-Force] [-Version <String>] [<CommonParameters>]
     21 ```
     22 
     23 ### IntegrityLatestSet
     24 
     25 ```
     26 Repair-WinGetPackageManager [-AllUsers] [-Force] [-Latest] [-IncludePreRelease]
     27  [<CommonParameters>]
     28 ```
     29 
     30 ## DESCRIPTION
     31 
     32 This command repairs the installation of the WinGet client on your computer by installing the
     33 specified version or the latest version of the client. This command can also install the WinGet 
     34 client if it is not already installed on your machine. It ensures that the client is installed 
     35 in a working state.
     36 
     37 ## EXAMPLES
     38 
     39 ### Example 1: Repair the WinGet client
     40 
     41 ```powershell
     42 Repair-WinGetPackageManager
     43 ```
     44 
     45 Ensures that the current installed version of WinGet is functioning properly.
     46 
     47 ### Example 2: Force install the latest version
     48 
     49 ```powershell
     50 Repair-WinGetPackageManager -Latest -Force
     51 ```
     52 
     53 This example shows how to repair they WinGet client by installing the latest version and ensuring
     54 it functions properly. The **Force** parameter shuts down the version that is currently running so
     55 that it can update the application files.
     56 
     57 ## PARAMETERS
     58 
     59 ### -AllUsers
     60 
     61 Use this parameter to repair the WinGet client for all user accounts on the computer. The command
     62 must run the command with administrator permissions.
     63 
     64 ```yaml
     65 Type: System.Management.Automation.SwitchParameter
     66 Parameter Sets: (All)
     67 Aliases:
     68 
     69 Required: False
     70 Position: Named
     71 Default value: None
     72 Accept pipeline input: True (ByPropertyName)
     73 Accept wildcard characters: False
     74 ```
     75 
     76 ### -Force
     77 
     78 The **Force** parameter shuts down the version that is currently running so that it can update the
     79 application files.
     80 
     81 ```yaml
     82 Type: System.Management.Automation.SwitchParameter
     83 Parameter Sets: (All)
     84 Aliases:
     85 
     86 Required: False
     87 Position: Named
     88 Default value: None
     89 Accept pipeline input: True (ByPropertyName)
     90 Accept wildcard characters: False
     91 ```
     92 
     93 ### -IncludePreRelease
     94 
     95 Use this parameter to include prerelease versions of the WinGet client.
     96 
     97 ```yaml
     98 Type: System.Management.Automation.SwitchParameter
     99 Parameter Sets: IntegrityLatestSet
    100 Aliases:
    101 
    102 Required: False
    103 Position: Named
    104 Default value: None
    105 Accept pipeline input: True (ByPropertyName)
    106 Accept wildcard characters: False
    107 ```
    108 
    109 ### -Latest
    110 
    111 Use this parameter to install the latest available version of the WinGet client.
    112 
    113 ```yaml
    114 Type: System.Management.Automation.SwitchParameter
    115 Parameter Sets: IntegrityLatestSet
    116 Aliases:
    117 
    118 Required: False
    119 Position: Named
    120 Default value: None
    121 Accept pipeline input: True (ByPropertyName)
    122 Accept wildcard characters: False
    123 ```
    124 
    125 ### -Version
    126 
    127 Use this parameter to specify the specific version of the WinGet client to install.
    128 
    129 ```yaml
    130 Type: System.String
    131 Parameter Sets: IntegrityVersionSet
    132 Aliases:
    133 
    134 Required: False
    135 Position: Named
    136 Default value: None
    137 Accept pipeline input: True (ByPropertyName)
    138 Accept wildcard characters: False
    139 ```
    140 
    141 ### CommonParameters
    142 
    143 This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
    144 -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable,
    145 -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
    146 [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
    147 
    148 ## INPUTS
    149 
    150 ### System.Management.Automation.SwitchParameter
    151 
    152 ### System.String
    153 
    154 ## OUTPUTS
    155 
    156 ### System.Int32
    157 
    158 ## NOTES
    159 
    160 ## RELATED LINKS
    161 
    162 [Get-WinGetVersion](Get-WinGetVersion.md)