In my case, BitLocker recovery became necessary when I disabled secure boot, before running your script. Fortunately, I was prepared for that.
Edit: or at least that's how I remember it. I did a lot of different things before running your script.
Wow.
I had tried all the advice on the net, and just couldn't get my Dell XPS 9360 to accept the KEK.
Until I tried your script.
As you describe in your post above, I disabled secure boot, deleted all keys, and ran your script. Bingo!
Thanks so very much.
Maybe include the text from your...