Initialize-Winget
1.3
This script ensures WinGet is properly installed and functional. It will:
1. Verify WinGet can find packages using the 'Microsoft.WinGet.Client' module.
2. Attempt to repair WinGet if package search fails.
3. Install WinGet and its dependencies if repair fails.
4. Locate and verify the winget.exe path.
The script also ensures that necessary helper module 'Microsoft.W
1. Verify WinGet can find packages using the 'Microsoft.WinGet.Client' module.
2. Attempt to repair WinGet if package search fails.
3. Install WinGet and its dependencies if repair fails.
4. Locate and verify the winget.exe path.
The script also ensures that necessary helper module 'Microsoft.W
This script ensures WinGet is properly installed and functional. It will:
1. Verify WinGet can find packages using the 'Microsoft.WinGet.Client' module.
2. Attempt to repair WinGet if package search fails.
3. Install WinGet and its dependencies if repair fails.
4. Locate and verify the winget.exe path.
The script also ensures that necessary helper module 'Microsoft.WinGet.Client' is installed and imported.
Show more
1. Verify WinGet can find packages using the 'Microsoft.WinGet.Client' module.
2. Attempt to repair WinGet if package search fails.
3. Install WinGet and its dependencies if repair fails.
4. Locate and verify the winget.exe path.
The script also ensures that necessary helper module 'Microsoft.WinGet.Client' is installed and imported.
Installation Options
Owners
Package Details
Author(s)
- Jonathan Pitre
Tags
Winget Intune Autopilot PowerShell Automation
Functions
Dependencies
This script has no dependencies.
Release Notes
1.3 - 2025-06-02
- Fixed try/catch block
- Improved logging and error handling
- Improved winget.exe path detection
1.2 - 2025-05-30
- Removed dependency on PSAppDeployToolkit.WinGet
- Fixed error "Find-ADTWinGetPackage -Id Microsoft.AppInstaller -Count 1 -Source winget"
- Improved logging and error handling
1.1 - 2025-05-30
- Fixed "Failed to execute Winget command: Cannot validate argument on parameter 'Id'"
- Improved logging and error handling
1.0 - 2025-05-28
- Initial release
FileList
- Initialize-Winget.nuspec
- Initialize-Winget.ps1
Version History
Version | Downloads | Last updated |
---|---|---|
1.3 (current version) | 231 | 6/2/2025 |
1.2 | 6 | 5/30/2025 |
1.1 | 6 | 5/30/2025 |
1.0 | 7 | 5/29/2025 |