1

I go to "endpoint.microsoft.com", and I login

And I click on "Apps" on the left side

And I click on "All Apps" in the middle

And I see my Win32 app "Test App" displayed in the results.

I click on "Test App" and I see that it's been installed 16 times. And its Version number is currently: 2.5

How do I, with PowerShell, change its version number to 3?

I have tried installing the module "Microsoft.Graph.Intune"

And after I run a Connect-MSGraph command

I run a Get-IntuneMobileApp | where {$_.DisplayName -eq 'Test App'}

And I'm able to see the App:

@odata.type                    : #microsoft.graph.win32LobApp
id                             : 75a18bff-aaa4-482a-8f04-440251482961
displayName                    : Test App
description                    : InstallPolicy.cmd
publisher                      : Sam P
largeIcon                      :
createdDateTime                : 9/23/2022 5:22:32 PM
lastModifiedDateTime           : 9/23/2022 6:21:57 PM
isFeatured                     : False
privacyInformationUrl          :
informationUrl                 :
owner                          :
developer                      : Sam P
notes                          :
publishingState                : published
committedContentVersion        : 1
fileName                       : InstallPolicy.intunewin
size                           : 432
installCommandLine             : InstallPolicy.cmd install
uninstallCommandLine           : InstallPolicy.cmd uninstall
applicableArchitectures        : x86,x64
minimumFreeDiskSpaceInMB       :
minimumMemoryInMB              :
minimumNumberOfProcessors      :
minimumCpuSpeedInMHz           :
msiInformation                 :
setupFilePath                  : InstallPolicy.cmd
minimumSupportedWindowsRelease : 1607
rules                          : {@{@odata.type=#microsoft.graph.win32LobAppFileSystemRule; ruleType=detection;
                                 path=C:\Temp; fileOrFolderName=VTest.log.txt; check32BitOn64System=False;
                                 operationType=exists; operator=notConfigured; comparisonValue=}}
installExperience              : @{runAsAccount=system; deviceRestartBehavior=suppress}
returnCodes                    : {@{returnCode=0; type=success}, @{returnCode=1707; type=success}, @{returnCode=3010;
                                 type=softReboot}, @{returnCode=1641; type=hardReboot}...}

But I don't see its Version Number

And how do I update its Version Number with PowerShell?

When I update the app by hand, and change its Version Number, it kicks off a new set of installations of the latest version.

I'm trying to kick off that process with PowerShell.

Sam
  • 11

1 Answers1

0

Based on the GraphAPI Doc for win32lobapp apps, the version is the ProductVersion number pulled from the MSI info win32LobAppMsiInformation property:

{
  "@odata.type": "#microsoft.graph.win32LobApp",
  "id": "String (identifier)",
  "displayName": "String",

...trimmed...

"msiInformation": { "@odata.type": "microsoft.graph.win32LobAppMsiInformation", "productCode": "String", "productVersion": "String", "upgradeCode": "String", "requiresReboot": true, "packageType": "String", "productName": "String", "publisher": "String" } }

I don't have MDM apps to test with, but you should be able to see those properties with something like:

Get-IntuneMobileApp | 
  where {$_.DisplayName -eq 'Test App'} |
  Select-Object -ExpandProperty msiInformation

If it returns blank then try running it in powershell v7+ (there are some improvements to JSON) and/or update the Graph module.

If the cmdlets aren't built out enough to update that property yet, you can always use Invoke-MgGraphRequest

Cpt.Whale
  • 10,914