Task Seqeunce to delete registry

Muhammad Mohsin Khan 21 Reputation points


I create a task sequence to delete the registry settings. unfortunately i could not ablt to delete the registry value. from manual command i am able to delete. please advise,

cmd.exe /c reg delete HKLM\SOFTWARE\Microsoft\Enrollments\value of deleting registry /f

User's image

Microsoft Intune Enrollment
Microsoft Intune Enrollment
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Enrollment: The process of requesting, receiving, and installing a certificate.
1,315 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Simon Ren-MSFT 31,911 Reputation points Microsoft Vendor


    Thank you for posting in Microsoft Q&A forum.

    1,Which account you are using to run the task sequence command? If you are using a user account, change it to 'system' account to have a try. Similar thread for your reference:

    Delete the registry Key using Task sequence

    2,You can also try to use package/application or configuration item to delete registry. Similar thread for your reference:

    Writing Current User registry keys in SCCM as System

    export and delete a registry KEY using sccm configuration items and baselines

    Thanks for your time. Have a nice day!

    Best regards,


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Simon Ren-MSFT 31,911 Reputation points Microsoft Vendor


    May we know the current status of the question? If there is any chance to try above suggestion? If there is any other assistance we can provide, please feel free to let us know, we will do our best to help you.

    Thanks and regards,


    0 comments No comments