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