Category filter
Script to set homepage in Edge on Windows devices
In corporate environments, users are often required to use a specific website. Conventionally, the homepage can be set from the browser settings. However, this can become a tedious task, especially when there are a large number of deployed devices. Using Hexnode’s custom script feature, you can easily deploy scripts to all your devices and set the preferred homepage from your Hexnode portal.
Batch script
1 2 |
REG ADD "HKLM\Software\Policies\Microsoft\Edge" /v "RestoreOnStartup" /d 0x00000004 /t REG_DWORD /f REG ADD "HKLM\Software\Policies\Microsoft\Edge\RestoreOnStartupURLs" /v "1" /d "https://www.hexnode.com" /f |
Replace the URL mentioned in the script with the desired URL to be set as homepage.
PowerShell script
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
$registryPath = 'HKLM:\Software\Policies\Microsoft\Edge' $regpath = 'HKLM:\Software\Policies\Microsoft\Edge\RestoreOnStartupURLs' $value = 0x00000004 $URL= 'https://www.hexnode.com' if(!(Test-Path $registryPath)) { New-Item -Path $registryPath -Force | Out-Null New-ItemProperty -Path $registryPath -Name RestoreOnStartup -Value $value -PropertyType DWORD -Force | Out-Null} ELSE { New-ItemProperty -Path $registryPath -Name RestoreOnStartup -Value $value -PropertyType DWORD -Force | Out-Null} Set-Location $registrypath New-Item -Name RestoreOnStartupURLs -Force Set-Itemproperty -Path $regpath -Name 1 -Value $URL Write-Host "The homepage has been set as: $URL" |
Replace the value provided for $URL
with the desired URL to be set as homepage.
What happens at device end
The homepage for Microsoft Edge browser is set to the desired URL and is loaded whenever the browser is launched.