Hi,
Did you runt the PS command in elevated ADmin mode? Try that option and also check the event logs and provide details if additional details are logged in the event viewer. There is another thread with similar issue check the solution might help - https://community.spiceworks.com/topic/2343349-unable-to-set-adfs-ssl-certificate-thumbprint
Hope this helps.
JS
==
Please accept as answer and do a Thumbs-up to upvote this response if you are satisfied with the community help. Your upvote will be beneficial for the community users facing similar issues.