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.
Note : This is not possible for Windows Azure AD Premium joined devices.
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"
- KeepAppsInstalled
If set to “True”, it will uninstall the SFD agent first – this will prevent the uninstallation of the app. - Reenrolldevice
If you want to automatically re-enroll the device, select “True” - DSServerURL
Device Server URL is needed to download the HUB and enroll the device with the staging user - UserName
Staging user name - UserPassword
Staging user password - OGID
Target OG where the device should be joined
Written by
Empowering customers in client management since 2012.
Empowering customers in modern management since 2018.
Fabian
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.
Grischa Ernst
Good point – thanks for the hint.
I’ll check this and update the script!