Configure Microsoft Edge with powershell - Windows 11

Viewed 31

My goal is to configure Microsoft Edge with Powershell only.

So for example, the first window does not appear when you open it for the first time, to adjust the overlay etc. . Set the home page, show the home button at the top, set favorites, etc.

What is the best way to do this with Powershell?

1 Answers

The logic to configuring MS Edge with PowerShell is you need to access and modify the relevant registry keys using PowerShell.

For configuring different Edge browser features, you need to configure the corresponding registries. so you would need to know which registry key is used for which feature.

Below is an example to set the Homepage for the Edge browser using Powershell.

# Ensure Edge key exists
$EdgeHome = 'HKCU:\Software\Policies\Microsoft\Edge'
If ( -Not (Test-Path $EdgeHome)) {
  New-Item -Path $EdgeHome | Out-Null
}
# Set RestoreOnStartup value entry
$IPHT = @{
  Path   = $EdgeHome 
  Name   = 'RestoreOnStartup' 
  Value  = 4 
  Type   = 'DWORD'
}
Set-ItemProperty @IPHT -verbose
# Create Startup URL's registry key
$EdgeSUURL = "$EdgeHome\RestoreOnStartupURLs"
If ( -Not (Test-Path $EdgeSUURL)) {
  New-Item -Path $EdgeSUURL | Out-Null
}
# Create a single URL startup page
$HOMEURL = 'https://duckduckgo.com'
Set-ItemProperty -Path $EdgeSUURL -Name '1' -Value $HomeURL

Helpful References:

  1. How to Change the Start Page for the Edge Browser
  2. How can I set the home page in Edge Chromium with Powershell?

The above example will give you an idea about how to access and modify the registry using PowerShell to configure the Edge features.

Further, you could make tests on your side to configure other options for the Edge browser.

Note: Some Edge options/ features are only available to configure if the machine is AD joined. If you try to configure and the machine is not AD joined then it will be ignored.

Related