-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRemove-EdgeStartup.ps1
More file actions
57 lines (45 loc) · 1.68 KB
/
Remove-EdgeStartup.ps1
File metadata and controls
57 lines (45 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Removes annoying Edge startup prompts. Used for lab systems to disable sync and other first run experienace stuff.
#requires -RunAsAdministrator
#requires -Version 5.1
<#
https://learn.microsoft.com/en-us/deployedge/microsoft-edge-browser-policies/hidefirstrunexperience
HideFirstRunExperience = 1 (Enabled == hide experience)
AutoImportAtFirstRun = 4 (DisabledAutoImport)
ForceSync = 0 (Disabled)
SyncDisabled = 1 (Enabled == disable sync)
BrowserSignin = 0 (Disabled)
NonRemovableProfileEnabled = 0 (Disabled)
NewTabPageContentEnabled = 0 (Disabled)
NewTabPageAllowedBackgroundTypes = 3 (DisableAll)
NewTabPageQuickLinksEnabled = 0 (Disabled)
#>
# the root of the Edge registry value path
$edgRootReg = "HKLM:\SOFTWARE\Policies\Microsoft\Edge"
# a hashtable for reg name to reg value
$edgeRegValues = @{
HideFirstRunExperience = 1
AutoImportAtFirstRun = 4
ForceSync = 0
SyncDisabled = 1
BrowserSignin = 0
NonRemovableProfileEnable = 0
NewTabPageContentEnabled = 0
NewTabPageAllowedBackgroundTypes = 3
NewTabPageQuickLinksEnabled = 0
}
# all values are DWORD
$edgeRegType = "Dword"
# create the root path
try {
$null = New-Item -Path $edgRootReg -Force -EA Stop
} catch {
Write-Warning "The reg path already exists: $_"
}
# add all the registry values
foreach ($val in $edgeRegValues.Keys) {
try {
$null = New-ItemProperty -Path $edgRootReg -Name $val -PropertyType $edgeRegType -Value $edgeRegValues["$val"]
} catch {
Write-Warning "Failed to add $val`: $_"
}
}