User Profile
Benjamin_Donato
Copper Contributor
Joined Oct 25, 2018
User Widgets
Recent Discussions
Need a PS Script to Search Registry and Delete Keys
Situation The organization configured laptops with an MDM that we no longer have access to. We are now enrolling all Windows computers into the Intune MDM. The laptops that are still enrolled in the previous MDM will not enroll in Intune. I have figured out how to remove the enrollment by deleting specific keys in the registry, but these key are not named the same so I can't just simply target and delete them. The key name used is consistent on the computer A but will be different on computer B. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Enrollments\FE600696-F255-4BB9-AE5E-63CC2A35047D HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EnterpriseResourceManager\Tracked\FE600696-F255-4BB9-AE5E-63CC2A35047D HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Provisioning\omadm\Accounts\FE600696-F255-4BB9-AE5E-63CC2A35047D Script Needed There appears to be only one key under the following paths: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EnterpriseResourceManager\Tracked\ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Provisioning\omadm\Accounts\ Need a script that can read the name of the key under one of these two paths and then search for and delete the same key and any child keys under the path HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Enrollments\Solved4.5KViews0likes4Comments
Recent Blog Articles
No content to show