Setting a homepage in Edge on Windows 11

I’ve found many articles that claim the following will do it:

# 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

This does not work for me. Any ideas what I’m missing?

—K

Found part of the problem.

I have been running Regedit as Administrator. When I run Regedit, NOT select “Run as Administrator”, and while logged in as the user which will be at the machine, it works.

So, now my question is:

how do I set this stuff for a specific user when my overall script is being run as Administrator?
Specifically, the machines which need the specific home page are all configured for AutoLogon with username “TCUtil”.
I have a script that runs as Administrator, which installs two applications and configures about ten items, such as data directory, timezone and WiFi channel, to name a few

I need the last step to set the homepage in Edge for user “TCUtil” to the specific web portal.

Ideas?

—K

For all users that have logged into the system you would need to edit the same key/value but under each reg profile under HKEY_USERS that start with S-1-5-21 and do not end in _class

If you want to set it for anyone that logs in you would need to mount the default registry hive under the public user profile and add it there.

Alternatively if this is a work computer (LDAP or Azure joined) you could set it with a GPO or intune

You may use Active Setup …

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.