Powershell_Scripts/Windows10/ADDReg1703.ps1

41 lines
3.2 KiB
PowerShell

$WimFile = "D:\TEMP\Windows10_1703\sources\install.wim"
$MountPath = D:\TEMP\Mount
Mount-WindowsImage -ImagePath $WimFile -Index 1 -Path $MountPath
#region Customise Default User Profile
Write-Output -InputObject "`nCustomising the default user profile...`n"
REG LOAD "HKLM\_USER" "$MountPath\Users\Default\NTUSER.DAT" | Out-Null
REG LOAD "HKLM\_SOFTWARE" "$MountPath\Windows\System32\config\SOFTWARE" | Out-Null
# HKCU
& REG ADD "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v SystemPaneSuggestionsEnabled /d 0 /t REG_DWORD /f
& REG ADD "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v PreInstalledAppsEnabled /d 0 /t REG_DWORD /f
& REG ADD "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v OemPreInstalledAppsEnabled /d 0 /t REG_DWORD /f
& REG ADD "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v DisableThumbnailCache /d 1 /t REG_DWORD /f
& REG ADD "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v LaunchTo /d 1 /t REG_DWORD /f
& REG ADD "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v StartupDelayInMSec /d 0 /t REG_DWORD /f
& REG ADD "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\Search" /v BingSearchEnabled /d 0 /t REG_DWORD /f
& REG ADD "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\Search" /v SearchboxTaskbarMode /d 1 /t REG_DWORD /f
& REG ADD "HKLM\_USER\Software\Policies\Microsoft\Internet Explorer\Restrictions" /v NoHelpItemSendFeedback /d 1 /t REG_DWORD /f
& REG DELETE "HKLM\_USER\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /f
# HKLM
# & REG ADD "HKLM\_SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v VerboseStatus /d 1 /t REG_DWORD /f
# & REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\Internet Explorer\Main" /v DisableAddSiteMode /d 1 /t REG_DWORD /f
# & REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\MRT" /v DontOfferThroughWUAU /d 1 /t REG_DWORD /f
& REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v DisableSoftLanding /d 1 /t REG_DWORD /f
& REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\Windows\CloudContent" /v DisableWindowsConsumerFeatures /d 1 /t REG_DWORD /f
& REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\WindowsStore" /v AutoDownload /d 2 /t REG_DWORD /f
& REG ADD "HKLM\_SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" /v AutoDownload /d 2 /t REG_DWORD /f
# & REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\Windows\Personalization" /v NoLockscreen /d 1 /t REG_DWORD /f
# & REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting" /v Disabled /d 1 /t REG_DWORD /f
# & REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v AllowSearchToUseLocation /d 0 /t REG_DWORD /f
# & REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v ConnectedSearchUseWeb /d 0 /t REG_DWORD /f
# & REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v DisableWebSearch /d 1 /t REG_DWORD /f
& REG ADD "HKLM\_SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoRebootWithLoggedOnUsers /d 1 /t REG_DWORD /f
REG UNLOAD "HKLM\_USER" | Out-Null
REG UNLOAD "HKLM\_SOFTWARE" | Out-Null
Dismount-WindowsImage -Path $MountPath -Save