I’m working on building a script that will change the Homepage in Edge for a bunch of VM’s running in Enterprise. I am looking for a way in powershell to do this, but nothing seems to make the change the will stick with the new image created proactively.
I tried many things, like this for instance:
# 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
But had no luck.
Please help?!