Skip to main content

Command Palette

Search for a command to run...

Force redeploy of Intune Applications using Powershell

Updated
โ€ข2 min read
Force redeploy of Intune Applications using Powershell
O

I work as System Administrator for more than 15 years now and I love to make my life easier by automating work & personal stuff via PowerShell (even silly things like food recipes list generation).

There can be times when you need to redeploy Win32App deployed from the Intune. Because the installation has failed too many times (so it won't be tried again) or just for testing purposes.

The solution is to delete registry key that correspond to such application from HKLM:\SOFTWARE\Microsoft\IntuneManagementExtension\Win32Apps\<scope>. image.png The tricky part here is that application is identified by its Intune ID not by name, so you will have to get the ID first.

How to get Intune Win32App ID

  • a) Easiest but most lame solution is to open such application page in Intune web portal and copy its ID from the URL image.png
  • b) More interesting solution is to use Graph API like Invoke-MSGraphRequest -Url "https://graph.microsoft.com/beta/deviceAppManagement/mobileApps?select=id,displayname" | Get-MSGraphAllPages

Invoke-IntuneWin32AppRedeploy to the rescue

If you want a ready-to-go solution, you can use my function Invoke-IntuneWin32AppRedeploy (now part of the IntuneStuff module) which gives you GUI with all deployed Intune Win32App(s), so you just select the correct one and hit OK to redeploy it.

By default user name (scope) and app name are automatically translated from IDs using data from Intune log and some regex magic, but in case they are not, call this function with parameter getDataFromIntune like ๐Ÿ‘‡ image.png

Btw redeploy as such is caused by restarting Intune service IntuneManagementExtension.

95% of the function code is based on my Get-ClientIntunePolicyResult for getting RSOP-like results for Intune policies

Have fun โœ”

PS: If you need to redeploy script check this post .

A

very nice stuff. let me ask this. as some of the functions need administrative elevation, when running powershell as admin, do things like the list of installed items not show if an application was installed / assigned in intune to a particular user?

O

You mean other user than the one whose admin credentials were used?

Anyway it doesn't matter which user run the function in case he has admin rights. Because all the data are in hklm part of the registry.

L

Stuff is Epic. I'm more of a visual learner and the information listed is super helpful to follow along. I've been in Intune for 1yr and there is SO much to learn and know.

O

Glad you like it :)

More from this blog

D

Do it PowerShell way :)

78 posts

With over 15 years of experience as a system administrator, I have a passion for automating workflows using PowerShell. I believe in sharing my creations with the community. Why not, right? :)