We are upgrading our Windows 7 devices to Windows 10 Edu. After the
upgrade, Microsoft Edge isn't working. It opens then it closes immediately.

I need to run that powershell script with admin rights:

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

How can I run that script in a bundle to repair Microsoft Edge.

Thanks for help.