Force Application Reinstall in Microsoft Intune (Win32 Apps)

During our Microsoft Intune trainings this year, one of the most frequently asked questions has been on how to force a reinstall / rerun / redeploy – whatever you like to call it – of an application deployed to Windows 10 or Windows 11 PCs. Well first of all, the correct Intune term is not deployed, it is assigned, since apparently using the same terminology across different systems management platforms developed by the same vendor is not on the table. Shorthand: Deployments in ConfigMgr are called Assignments in Intune.

Update January 1, 2026: Made same changes in the GRS logic due to changes in IME.

Scenario

The reasons for wanting to force an application reinstall, or rerunning a script can be many, but it is indeed quite useful during testing, especially larger scale testing of required assignments, or when trying out different detection rules for an app in Intune (the equivalent of detection methods in ConfigMgr).

Win32 Apps – Background Info

Most organizations I've worked with are configuring their Win32 apps install behavior to system, since it doesn't require the user to be an administrator during the installation of the application. In this example you will learn how to force the reinstall of a required application assignment to a device.

Win32 App Install behavior in Intune

When a Win32 app is installed via Intune, it's installed via the Microsoft Intune Management Extension (IME) agent. IME keeps track of deployments in the following registry key:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IntuneManagementExtension\Win32Apps

Under the Win32Apps key, you find one sub key for each user, where the key name is the same as the user object id in Azure Ad. If you want to force a reinstall of all apps deployed, you can simply delete the user id key. But if you want to force a reinstall of a single app, you need to delete the app id as well as it's corresponding GRS (Global Retry Schedule key). Both located under the user key. Here is an example:

Win32Apps registry key sample from a machine enrolled into Microsoft Intune.
GRS Key

In the preceding images, the red rectangle is the user key, and the blue rectangle is one of the deployed apps. Based on this info, if I wanted to reinstall every single apps, I could run this PowerShell script which deletes all app IDs as well as the GRS keys:

# Delete all apps for a user
$Path = "HKLM:SOFTWARE\Microsoft\IntuneManagementExtension\Win32Apps"
$UserObjectID = "18ba2977-ea61-4547-8e8b-e9cbbced8719"
Get-Item -Path $Path\$UserObjectID | Remove-Item -Recurse -Force

More likely though, if I wanted to reinstall a single app, I would first delete the single application id instead, and then I would have to locate the right GRS key and delete that one. Previously the GRS key had to located by parsing the IME log file, but now the application is part of the GRS key which makes it easier. Below is sample script to do all of this:

# Sample to delete a single app
#
# Update January 1, 2026: Made more changes in the GRS logic. 
# Credit to David Bolding: https://therandomadmin.com/2025/01/01/force-intune-apps-to-redeploy/
$Path = "HKLM:\SOFTWARE\Microsoft\IntuneManagementExtension\Win32Apps"
$AppID = "<Intune Application ID>"
 
# Purposely not skipping the 00000000-0000-0000-0000-000000000000 entry
# This is used when an app is device-assigned, or runs in system context
$Users = (Get-ChildItem -Path "$Path").name | Where-Object {($_ -like "*-*-*-*-*")}
 
foreach ($user in $Users) {
    $Name = $User -replace "HKEY_LOCAL_MACHINE","HKLM:"
    $UserID = $user.split("\")[-1]
    $Applications = Get-ChildItem -Path $Name | Where-Object {$_.name -like "*$($AppID)*"}
    foreach ($App in $Applications) {
        $AppName = $App -replace "HKEY_LOCAL_MACHINE","HKLM:"
        Write-Host "App found"
        remove-item -Path $AppName -Recurse -Verbose -force
    }
    $GRSPath = "HKLM:\SOFTWARE\Microsoft\IntuneManagementExtension\Win32Apps\$UserID\GRS"
    $GRSes = Get-childitem -path $GRSPath
    foreach ($GRS in $GRSes) {
        $GRSProps = $GRS | Get-ItemProperty
        $Count = $GRSProps.psobject.Properties.count 
        if ($Count.count -gt 5) {
            $TotalKey = $GRSProps.psobject.Properties.name | where-object {$_ -like "*-*-*-*-*"}
            if ($TotalKey -like "*$($AppID)*") {
                Write-Host "GRS Entry found, path to remove $PathToRemove"
                $PathToRemove = $GRS.name -replace "HKEY_LOCAL_MACHINE","HKLM:"
                Remove-Item -Path $PathToRemove -Recurse -Force -Verbose
            }
        }
    }
}
Get-Service -DisplayName "Microsoft Intune Management Extension" | Restart-Service -Verbose

Note #1: Make sure you also uninstall the existing application or remove whatever the application detection rule is configured to look for. Sometimes an Intune policy sync is also required.

Note #2: When deleting a single application, you have to use a wildcard match, since the registry key actually contains the revision of the app as well.

As for finding the application id, you can see it in the browser address bar when viewing the application in Intune, or you can use the below PowerShell script. Just remove the trailing _1 from the app registry key when searching for a matching guid:

# Connect to Microsoft Graph 
# Requires the Microsoft.Graph.Intune module to be installed
Connect-MSGraph -ForceInteractive

# Get all Apps and their id
$Apps = Get-DeviceAppManagement_MobileApps 
$Apps | select displayName, id

# Get Apps, their size in MB, and their id. Filter on App Name
$Apps = Get-DeviceAppManagement_MobileApps -Filter "contains(displayName, '100 MB Single File')"
$Apps | select displayName, @{Label="Size in MB";Expression={[math]::Round(($_.size/1MB),2)}}, id 
Showing details for a specific application.
About the author

Johan Arwidmark

4.4 5 votes
Article Rating
Subscribe
Notify of
guest
49 Comments
Newest
Oldest Most Voted
Richard Brown
Richard Brown
1 month ago

I have co-managed environment. App installed from sccm with same detection method as app assigned from intune. COmpany portal shows that app not installed from intune (but detection method is correct). Is it a way to install app from sccm then if same app in intune has same detection method, it should be showen as installed? (app deployed as available)

Richard Brown
Richard Brown
23 days ago

Thank you Johan.
maybe is it other way or you can propose something? I mean if i am migrating all apps to intune from sccm, how I can make them visible in company portal as installed, without asking users to click install to trigger detection?
Or no way here?
Thanks in advance

James Mahnke
James Mahnke
4 months ago

There might be a much simpler way … if the app is published in your Company Portal simply (re)install it from there. You may want/have to uninstall it first.

Stephen
Stephen
9 months ago

Hi, it seems the logging has been changed once again. I can no longer find any strings "is not expired." in the IntuneManagementExtension logs.

I do see some entries in the Appworkload.log, but they do not look like the ones we are looking for.

Jonathan
Jonathan
1 year ago

Hello, is it possible to force reinstallation of Microsfot Store apps like the win32 apps?
Thanks in advance

Nathalie
Nathalie
1 year ago

A thousand thank you for this

Gustavo
Gustavo
1 year ago

Worked liked a charm thanks!

Dhiraj
Dhiraj
1 year ago

Not sure if I am missing something, but I tried all steps as it is still getting below error. even though I can see the entries are there in registry.

GetAppGRSHash : Unable to find App '9092b934-e7ef-4780-a834-8617094132d6' GRS hash in any of the Intune log files. Redeploy will probably not work as expected
At line:1 char:12
+ $GRSHash = GetAppGRSHash -appId $AppID
+      ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  + CategoryInfo     : NotSpecified: (:) [Write-Error], WriteErrorException
  + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,GetAppGRSHash

Dhiraj Dhote
Dhiraj Dhote
1 year ago

Sure Thanks. But when I am trying to delete these regs, it's still not working. Let me brief what I am trying to achieve. I am trying to install a O365 apps via Win32. It works perfectly fine for any device for 1st time when we install it from Company Portal. But when I try to re-install the same again by changing detection method it gets failed. I tried all possible way to do it, but failed. I want to know if it's possible or not, to re-install the same app again by changing the detection method. As per my… Read more »

D P
D P
1 year ago

Simple fix:
Change

$intuneLogList = Get-ChildItem -Path "$env:ProgramData\Microsoft\IntuneManagementExtension\Logs" -Filter "IntuneManagementExtension*.log" -File | sort LastWriteTime -Descending | select -ExpandProperty FullName

to

$intuneLogList = Get-ChildItem -Path "$env:ProgramData\Microsoft\IntuneManagementExtension\Logs" -Filter "*.log" -File | sort LastWriteTime -Descending | select -ExpandProperty FullName

Who cares if it searches all the log files in there… let it search 'em all 🙂

Dom
Dom
1 year ago

I'm curious: why is it important to only delete the GRS entry for the specific app? I was running into the "Unable to find App …." error, so I deleted the particular app hive (based on app id) and deleted the entire GRS hive. I restarted the IME service, which then promptly deployed only the deleted app and recreated the GRS hive.

Are there risks and/or drawbacks to deleting the entire GRS hive?

Thorsten Frohberg
Thorsten Frohberg
2 years ago

Hello Johan, Thank you for the great tutorial. Sad to say, but the GetAppGRSHas Function doesn't work anymore. I think Microsoft changes somethings with the IntuneManagementExtension Logs. There is no more Log Entrys with the Patterns [Win32App\]\[GRSManager\. My simple solution for this is: $Path = "HKLM:SOFTWARE\Microsoft\IntuneManagementExtension\Win32Apps" $AppID = "485c2b07-5162-4d4b-affc-a95421aaf7c2" $SIDList = (Get-ChildItem $Path).Name Foreach ($SID in $SIDList) {   [string]$SID = $SID.Split('\')[5]   $NewPath = "$Path\$SID"   $RemoveAppID = (Get-ChildItem -Path $NewPath) -match $AppID   If ($RemoveAppID) {       (Get-ChildItem -Path $NewPath) -match $AppID | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue       $HashID = (Get-ItemProperty "$NewPath\GRS\*\" -ErrorAction SilentlyContinue | Where-Object {$_ -match "$AppID"}).PSChildName       Get-Item -Path "$NewPath\GRS\$HashID" -ErrorAction… Read more »

Timmothy Green
Timmothy Green
1 year ago

It looks like you are scanning the GRS subkeys for properties matching the AppID. I've noticed that some have a property with a corresponding AppID and some only have SubgraphEvaluationTimeUTC and nothing else.

Peter Enis
Peter Enis
2 years ago

Great tutorial! Is it possible that the Line 34 "Write-Error "Unable to find App '$appId' GRS hash in any of the Intune log files. Redeploy will probably not work as expected" is placed wrongly outside of an IF Statement and therefore displayed at each run?

Peter Breeze
Peter Breeze
2 years ago

Great article and very useful

Last edited 2 years ago by Peter Breeze
Aleks
Aleks
3 years ago

Awesome job, this is a great resource. One thing to add for anyone who stumbles on this is that I found log messages may have changed since this was last written. So the regex pattern for extracting the hash did not quite work for me and I would receive the "Unable to find app" error message. In my experience the hash could be extracted by looking for a log message with the following format [GRS Manager] Saved GRS Value: [timestamp] to path: $UserObjectId\GRS\$GRSHash\$AppId… Something like the following regex pattern should be able to extract the GRS hash "\\[GRS Manager\\] Saved… Read more »

Last edited 3 years ago by Aleks
Ross
Ross
3 years ago

Pardon my ignorance on this, but does this also apply to mobile devices? We have deployed Company Portal / Intune on our company cell phones and quite often we have to uninstall / reinstall Microsoft Teams / Office and it's a nightmare. Any suggestions / steps to make this process more seamless and palatable?

Andrew Johnson
Editor
3 years ago
Reply to  Ross

Hi Ross – this method would be Windows only, unfortunately. The only method I'm aware of for mobile devices is what you've already stated – you can assign an uninstall then assign an install.

Ross
Ross
3 years ago
Reply to  Andrew Johnson

Thank you. I'm hoping the future is brighter for mobile devices with Intune and that Microsoft improves this process, since that's the direction we're headed with business operations. Thanks again.

Søren
Søren
3 years ago

Thanks Julius,
Could you explain a bit how the detection works for available deployments and how that could be triggered?

Lets say you have a scenario where you want to run detection checks on "available" deployments. Is there any way to force check of only "available" type deployments instead of just required?

Chris
Chris
3 years ago

Not really adding anything useful here – thanks for the useful post as ever Johan – but it is wholly unacceptable that we have to go to such lengths to do this. I wish MS could just put a button in Intune 🙁

Julius
3 years ago

Is the GRS hash unique to each machine or is it unique to the app/appid?

Lucas
Lucas
4 years ago

Hi !
Thank you for this post. Did you have any idea why in my case it doesn't reinstall ? I removed the registry key as you said and did sync but nothing happening (since yesterday).

Lucas

Lucas
Lucas
4 years ago

Hi ! I found the problem, it was caused by the Registry key GRS. I just removed it and it's done. Thank you. Maybe you should add it in your article.

Capture.PNG
Bj ch
Bj ch
4 years ago

Do you know how to find out how to see What app is connected to the registry Keys?

Femi
Femi
4 years ago

How do you get the app id that correlates to the app you want to reinstall? Cannot find anything in Intune that indicates that

Johan
Johan
4 years ago

Hi,

What about the Detection rules? You don't need to take them in considerations? Won't the package think it's still installed if you only delete the registry key mentioned in above?
Br
Johan

Manuel
Manuel
4 years ago

But what about the detection rule. Does the detection rule mark the application as installed before the installer is started ?

Andrew
Andrew
4 years ago

>