src/PowerShell/Help/Microsoft.WinGet.Client/Assert-WinGetPackageManager.md
Verifies that WinGet is installed properly.
Assert-WinGetPackageManager [-Version <String>] [<CommonParameters>]
Assert-WinGetPackageManager [-Latest] [-IncludePrerelease] [<CommonParameters>]
Verifies that WinGet is installed properly.
[!NOTE] The cmdlet doesn't ensure that the latest version of WinGet is installed. It just verifies that the installed version of Winget is supported by installed version of the Microsoft.WinGet.Client module.
Assert-WinGetPackageManager
If the current version of WinGet is installed correctly, the command returns without error.
Assert-WinGetPackageManager -Latest
If the latest version of WinGet is compatible with the installed Microsoft.WinGet.Client module, the command returns without error.
Assert-WinGetPackageManager -IncludePreRelease
If the prerelease version of WinGet is compatible with the installed Microsoft.WinGet.Client module, the command returns without error.
Assert-WinGetPackageManager -Version v1.8.1911
If the specified version of WinGet is compatible with the installed Microsoft.WinGet.Client module, the command returns without error.
Include preview versions of WinGet.
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
Verify that the latest version of WinGet is compatible with the installed version of the Microsoft.WinGet.Client module.
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
Verify that a specific version of WinGet is installed correctly.
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.