Hi,
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,
Simon
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.