Sample_7zip.ps1
# Create .intunewin package file New-IntuneWin32AppPackage -SourceFolder C:\Temp\IntuneWinAppUtil\Source\7-Zip -SetupFile "7z1900-x64.msi" -OutputFolder C:\Temp\IntuneWinAppUtil\Output -Verbose # Get MSI meta data from .intunewin file $IntuneWinFile = "C:\Temp\IntuneWinAppUtil\Output\7z1900-x64.intunewin" $IntuneWinMetaData = Get-IntuneWin32AppMetaData -FilePath $IntuneWinFile # Create custom display name like 'Name' and 'Version' $DisplayName = $IntuneWinMetaData.ApplicationInfo.Name + " " + $IntuneWinMetaData.ApplicationInfo.MsiInfo.MsiProductVersion # Create MSI detection rule $DetectionRule = New-IntuneWin32AppDetectionRule -MSI -MSIProductCode $IntuneWinMetaData.ApplicationInfo.MsiInfo.MsiProductCode # Create requirement rule $RequirementRule = New-IntuneWin32AppRequirementRule -Architecture All -MinimumSupportedOperatingSystem 1903 # Add new MSI Win32 app Add-IntuneWin32App -TenantName configmgrse.onmicrosoft.com -FilePath $IntuneWinFile -DisplayName $DisplayName -InstallExperience system -RestartBehavior suppress -DetectionRule $DetectionRule -RequirementRule $RequirementRule -Verbose |