I placed the following commands into a batch file to reset Edge (which has been giving some problems from time to time). The batch file was then run at Administrator level. Please note the triple quotes in the powershell line. This example may clarify things for those trying to run a powershell command from a "cmd" command line.
@echo off
c:
cd %userprofile%\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe
rmdir /s /q
userprofile%\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe
powershell "Get-AppXPackage -AllUsers -Name Microsoft.MicrosoftEdge | Foreach
{Add-AppxPackage -DisableDevelopmentMode -
Register"""$($_.InstallLocation)\AppXManifest.xml""" -Verbose}"
Note the "triple" quotes in the Powershell line. That line by the way is a single line
with "For Each" and "-Register" being word-wrapped in this comment-box. It should be a single line though in the batch file (or on the command line if manually typed into a cmdcmd
session).
The important thing is that after the word "PowerShell" inverted commas (") start and end the command and any internal inverted commas already in the powershell command being passed are converted to "triple" quotes (""""""
)