Re-Enroll Windows device without app uninstallation
If you want to quickly re-enroll a Windows device you’ll see that managed applications getting uninstalled. Also some configurations are left on the device.
I created a script to clean up all the left overs and to re-install + re-enroll the HUB.
You can find the script HERE.
You need to run PowerShell as administrator and run the following command:
reenroll.ps1 -KeepAppsInstalled True -Reenrolldevice True -DSServerURL "ds137.awmdm.com" -UserName "StagingUser" -UserPassword "StagingPassword" -OGID "570"
If set to “True”, it will uninstall the SFD agent first – this will prevent the uninstallation of the app.
If you want to automatically re-enroll the device, select “True”
Device Server URL is needed to download the HUB and enroll the device with the staging user
Staging user name
Staging user password
Target OG where the device should be joined
Empowering customers in client management since 2012.
Empowering customers in modern management since 2018.
2 thoughts on “Re-Enroll Windows device without app uninstallation”
First, thank you for the script. Could come in handy.
For environments with assist something has to be added to the “#Uninstall Agent […]” Part, as this grabs two ID`s. One for the Workspace One Hub and on for the Workspace One Assist app. With that added the script works great.
Good point – thanks for the hint.
I’ll check this and update the script!