-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathregistry-mods.ps1
98 lines (90 loc) · 3.55 KB
/
registry-mods.ps1
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Disable FastBoot
$RegistryPath1 = 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power'
$Name1 = 'HiberbootEnabled'
$Value1 = '0'
# Create the key if it does not exist
If (-NOT (Test-Path $RegistryPath1)) {
New-Item -Path $RegistryPath1 -Force | Out-Null
}
# Now set the value
New-ItemProperty -Path $RegistryPath1 -Name $Name1 -Value $Value1 -PropertyType DWORD -Force
# Enable Remote Desktop
$RegistryPath2 = 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server'
$Name2 = 'fDenyTSConnections'
$Value2 = '1'
# Create the key if it does not exist
If (-NOT (Test-Path $RegistryPath2)) {
New-Item -Path $RegistryPath2 -Force | Out-Null
}
# Now set the value
New-ItemProperty -Path $RegistryPath2 -Name $Name2 -Value $Value2 -PropertyType DWORD -Force
# Enable Remote Desktop
$RegistryPath3 = 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp'
$Name3 = 'UserAuthentication'
$Value3 = '1'
# Create the key if it does not exist
If (-NOT (Test-Path $RegistryPath3)) {
New-Item -Path $RegistryPath3 -Force | Out-Null
}
# Now set the value
New-ItemProperty -Path $RegistryPath3 -Name $Name3 -Value $Value3 -PropertyType DWORD -Force
# Hide Edge First Run
$RegistryPath4 = 'HKLM:\SOFTWARE\Policies\Microsoft\Edge'
$Name4 = 'HideFirstRunExperience'
$Value4 = '1'
# Create the key if it does not exist
If (-NOT (Test-Path $RegistryPath4)) {
New-Item -Path $RegistryPath4 -Force | Out-Null
}
# Now set the value
New-ItemProperty -Path $RegistryPath4 -Name $Name4 -Value $Value4 -PropertyType DWORD -Force
# Disable Auto Logon
$RegistryPath5 = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon'
$Name5 = 'AutoAdminLogon'
$Value5 = '0'
# Create the key if it does not exist
If (-NOT (Test-Path $RegistryPath5)) {
New-Item -Path $RegistryPath5 -Force | Out-Null
}
# Now set the value
New-ItemProperty -Path $RegistryPath5 -Name $Name5 -Value $Value5 -PropertyType DWORD -Force
# Outlook Shared Mailbox Trash Setting
$RegistryPath6 = 'HKLM:\Software\Microsoft\Office\16.0\Outlook\Options'
$Name6 = 'DelegateWastebasketStyle'
$Value6 = '4'
# Create the key if it does not exist
If (-NOT (Test-Path $RegistryPath6)) {
New-Item -Path $RegistryPath6 -Force | Out-Null
}
# Now set the value
New-ItemProperty -Path $RegistryPath6 -Name $Name6 -Value $Value6 -PropertyType DWORD -Force
# Set variables to indicate value and key to set
$RegistryPath7 = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Feeds'
$Name7 = 'ShellFeedsTaskbarViewMode'
$Value7 = '2'
# Create the key if it does not exist
If (-NOT (Test-Path $RegistryPath7)) {
New-Item -Path $RegistryPath7 -Force | Out-Null
}
# Now set the value
New-ItemProperty -Path $RegistryPath7 -Name $Name7 -Value $Value7 -PropertyType DWORD -Force
# Set variables to indicate value and key to set
$RegistryPath8 = 'HKCU:\Control Panel\Desktop'
$Name8 = 'LogPixels'
$Value8 = '96'
# Create the key if it does not exist
If (-NOT (Test-Path $RegistryPath8)) {
New-Item -Path $RegistryPath8 -Force | Out-Null
}
# Now set the value
New-ItemProperty -Path $RegistryPath8 -Name $Name8 -Value $Value8 -PropertyType DWORD -Force
# Set variables to indicate value and key to set
$RegistryPath9 = 'HKCU:\Control Panel\Desktop'
$Name9 = 'Win8DpiScaling'
$Value9 = '0'
# Create the key if it does not exist
If (-NOT (Test-Path $RegistryPath9)) {
New-Item -Path $RegistryPath9 -Force | Out-Null
}
# Now set the value
New-ItemProperty -Path $RegistryPath9 -Name $Name9 -Value $Value9 -PropertyType DWORD -Force