I need to open URL in Microsoft Edge (on Windows 10). When I invoke
start shell:AppsFolder\\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge http://www.go
microsoft-edge:http://google.com
(open google as desired)
microsoft-edge:
(just open)
All the other solutions work for Microsoft Edge (legacy) and on Windows 10 only. As of 2020, it will be discontinued and replaced by Microsoft Edge (Chromium based).
The solution that works with the new Edge on Windows 7, 8 and 10 is :
start msedge URL
Source :
Windows 10: Create a shortcut with this destination:
%windir%\system32\cmd.exe /c "start microsoft-edge:https://twitter.com"
Looks like things have changed and the previous solution doesn't work anymore.
However, here is the working command to launch CNN.com on Microsoft Edge:
microsoft-edge:http://www.cnn.com
Personally, I use this function which I created and put in my profile script ...\Documents\WindowsPowerShell\….profile
, feel free to use it. As I am from the UK, I prefer to go to .co.uk
where possible, if you are from another area, you can add your own country code.
# Function taking parameter add (address) and opens in edge.
Function edge {
param($add)
if (-not ($add -contains "https://www." -or $add -contains "http://www.")) {
if ($add[0] -eq "w" -and $add[1] -eq "w" -and $add[2] -eq "w") {
$add = "https://" + $add
} else {
$add = "https://www." + $add
}
}
# If no domain, tries to add .co.uk, if fails uses .com
if (-not ($add -match ".co" -or $add -match ".uk" -or $add -match ".com")) {
try {
$test = $add + ".co.uk"
$HTTP_Request = [System.Net.WebRequest]::Create($test)
$HTTP_Response = $HTTP_Request.GetResponse()
$add = $add + ".co.uk"
} catch{
$add = $add + ".com"
}
}
Write-Host "Taking you to $add"
start microsoft-edge:$add
}
Then you just have to call: edge google
in powershell to go to https://www.google.co.uk
While the accepted answer is correct, it has the unwanted artifact of flashing a console window when running from a non-console application.
The solution I found works best, which is only mentioned here in a comments to the question, is the following command line:
explorer.exe "microsoft-edge:<URL>"
Keep in mind that if contains the %
sign you will need to type %%
as Windows uses the symbol for variable expansion.
Hope someone finds this helpful.