microsoftgraph / powershell-intune-samples

This repository of PowerShell sample scripts show how to access Intune service resources. They demonstrate this by making HTTPS RESTful API requests to the Microsoft Graph API from PowerShell.
MIT License
1.36k stars 657 forks source link

Adding MSIX to Application_LOB_Add.ps1 #206

Open NEllis280 opened 2 years ago

NEllis280 commented 2 years ago

Added functions to the Application_LOB_Add.ps1 in order to include MSIX type LOB apps.

Get-MSIXManifest retrieves the MSIX manifest from the bundled MSIX package in order to populate data about the application.

Get-MSIXPublisherId gets the publisher ID hash from the publisher name retrieved from the appx manifest.

Get-MSIXFileInformation populates values from the retrieved appx manifest for the following: DisplayName, Description, Publisher, IdentityVersion, PublisherHash (passed in from Get-MSIXPublisherID), and IdentityName

Get-MSIXAppBody generates the body for the post request.

Upload-MSIXLob performs the addition of the MSIX LOB app to intune using the new functions, as well as the functions that already exist in the codebase.

Please note that I have attempted to write the new functions adhering as closely to the style of the existing codebase.