Very helpful, though on Option 2 there for the removal in a Microsoft Edge environment there’s a syntax error in that command line which causes it to fail. I found the correct version elsewhere which is:

Get-AppXPackage -AllUsers -Name Microsoft.MicrosoftEdge | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)AppXManifest.xml” -Verbose}

It looks almost identical to the one on this page, but notice the quotes added in the command line in this version, which make all the difference. And it worked perfectly for me.