US English (US)
GB English (UK)

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Create ticket
English (US)
US English (US)
GB English (UK)
  • Home

Prevent Migration Agent uninstall when deployed from Intune

Learn how to prevent the uninstallation of Migration Agent when deploying it through Intune for greater security and stability.

Written by Conrad Murray

Updated at January 22nd, 2025

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Getting Started
  • FAQs
  • API Documentation
  • Integrations
  • Migration Agent
  • Directory Synchronisation
  • Remote DC agent
  • Remote Password Sync Agent
+ More

If you are using Intune to push out the PowerSyncPro Migration Agent, then there is a possibility it could be uninstalled / removed during the execution of the migration agent part way through, and your migration will fail to complete.

 

Intune App deployment

If the Intune App deployment is configured under assignments as “Required” - then when a device is de-registered/deleted/removed from the source tenant Intune as part of a migration, then the PowerSyncPro application will be uninstalled.  

Intune Required App v Available for enrolled devices.

Testing

Please thoroughly end-to-end test your migration in advance of a production roll-out with test machines, early adopters, pilot users.

If this is likely to be an issue for then you can use a Pre-Migration command script to prevent this happening.

 

STEPS

Step 1

Create a ps1 file with the following code:

$PSPUninstallItems = @(Get-ChildItem HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall | ? { $_.GetValue('displayName') -eq 'PowerSyncPro Migration Agent' } )
$ManagedApplications = @(Get-ChildItem HKLM:\SOFTWARE\Microsoft\EnterpriseDesktopAppManagement -Recurse)
Foreach( $PSPUninstallItem in $PSPUninstallItems ) {
$ManagedPSPApplications = @($ManagedApplications | ? { $_.GetValue('ProductCode') -eq $PSPUninstallItem.PSChildName })
foreach( $ManagedPSPApplication in $ManagedPSPApplications ) {
Remove-Item $ManagedPSPApplication.PSPath -Recurse -Force
}
}

Save it as BlockIntuneUninstallofPSP.ps1

Step 2

Create a cmdline.cmd file with the following code:

start "" /WAIT PowerShell.exe -ExecutionPolicy Unrestricted -File .\BlockIntuneUninstallofPSP.ps1

 

Step 3

Add both files into a zip file and call it BlockIntuneUninstallofPSP.zip

Step 4

Add this to the Start-Up tab of your Runbook

 

This will prevent the uninstall of PowerSyncPro deployed from Intune, by updating the relevant Registry Keys.

 

 

 

 

 

 

remove block

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Migration Agent is not starting or registering on a device
  • Setup Migration Agent to reconfigure Azure Information Protection
  • Workgroup workstation migration process

Subscribe to Newsletter

Drop your email in the box below to sign up. We promise to keep our updates relevant and useful – and we’ll never share your details.

PowerSyncPro is the ultimate product for easing the pain and frustration during mergers, acquisitions, divestitures, and consolidations.

Terms & Conditions

  • FAQs
  • Privacy Policy
  • Cookies
  • Anti Slavery Notice

PowerSyncPro

  • Case Studies
  • Contact sales
  • Meet the Team
  • EULA

Get Connected

Room 73, Wrest House, Wrest Park, Silsoe, Bedford, England, MK45 4HR
info@powersyncpro.com

Twitter Youtube Linkedin

Knowledge Base Software powered by Helpjuice

Expand