Some error fixes and improvements for documentation#43
Conversation
Adds requires to handle common errors. Changes logic for detection of IntuneWin32App for more reliability.
…y administrator requirement
There was a problem hiding this comment.
Pull request overview
This PR updates the Winget Intune Packager PowerShell script and documentation to improve UI validation, icon retrieval robustness, and user guidance for Entra app registration setup.
Changes:
- Added required-field validation for Intune Graph connection details in the GUI.
- Reworked warning propagation from Intune app creation and made icon download more defensive when no icon is available.
- Expanded README with Entra app registration prerequisites and ignored
config.envvia.gitignore.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
sources/WingetIntunePackager.ps1 |
Adds GUI input validation, adjusts warning handling for packaging, improves icon fetching, bumps version, and adds a #Requires directive. |
README.md |
Adds Entra app registration prerequisite instructions (with a few typos to correct). |
.gitignore |
Ignores config.env to avoid committing local configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (-not [string]::IsNullOrEmpty($warning)) { | ||
| Start-PopUp $warning | ||
| } |
| Add-IntuneWin32App @Win32AppArgs -WarningVariable warning | ||
| $warning | foreach-object { | ||
| Write-Warning ($warning -join "`n") | ||
| } |
|
|
||
| ## Prerequisites | ||
|
|
||
| Before using the tool, you must create an app registion in Entra: |
|
|
||
| 1. Open the **Microsoft Entra admin center** | ||
| 1. In Microsoft Entra admin center, click **App registrations**. | ||
| 1. In App registations, click **New registration**. |
| 1. Open the **Microsoft Entra admin center** | ||
| 1. In Microsoft Entra admin center, click **App registrations**. | ||
| 1. In App registations, click **New registration**. | ||
| 1. In Register an application, enter a **Name**, e.g., *WingetIntunepackager*. Leve **Supported account types** on **Single tenant only**. Under **Redirect URI (optional)**, select **Public client/native (mobile & desktop)** and enter **https://login.microsoftonline.com/common/oauth2/nativeclient**. Click **Register** |
| ### APP INFO ### | ||
|
|
||
| #Winget Intune Packager version | ||
| $Script:WingetIntunePackager = "1.2.2" | ||
| $Script:WingetIntunePackager = "1.2.3" |
|
Hi Rokory, Thanks a lot for your contribution 🙏 I used Copilot to review your PR, and it suggested several improvements. It actually created a separate PR (#44) with those changes instead of updating yours directly. I'd prefer to keep your PR as the main one, so could you take a look at #44 and let me know what you think? Thanks again for your work, really appreciated! |
I improved the checks for installed modules and fixed some minor errors. Moreover, error handling, e.g. on missing permissions, is much more robust now.
Futhermore, I also improved the readme with instructions on how to create the app in Entra.