335 lines
21 KiB
PowerShell
Executable File
335 lines
21 KiB
PowerShell
Executable File
##########
|
|
# Win10 Initial Setup Script
|
|
# Author: Disassembler <disassembler@dasm.cz>
|
|
# Version: 1.4, 2016-01-16
|
|
##########
|
|
|
|
# Run as admin:
|
|
# Set-ExecutionPolicy Unrestricted
|
|
|
|
##########
|
|
# Privacy Settings
|
|
##########
|
|
|
|
# Disable SmartScreen Filter
|
|
Write-Host "Disabling SmartScreen Filter..."
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\AppHost" -Name "EnableWebContentEvaluation" -Type DWord -Value 0
|
|
|
|
# Enable SmartScreen Filter
|
|
# Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\AppHost" -Name "EnableWebContentEvaluation"
|
|
|
|
# Disable Bing Search in Start Menu
|
|
Write-Host "Disabling Bing Search in Start Menu..."
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search" -Name "BingSearchEnabled" -Type DWord -Value 0
|
|
|
|
# Enable Bing Search in Start Menu
|
|
# Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search" -Name "BingSearchEnabled"
|
|
|
|
# Disable Feedback
|
|
Write-Host "Disabling Feedback..."
|
|
If (!(Test-Path "HKCU:\Software\Microsoft\Siuf\Rules")) {
|
|
New-Item -Path "HKCU:\Software\Microsoft\Siuf\Rules" -Force | Out-Null
|
|
}
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Siuf\Rules" -Name "NumberOfSIUFInPeriod" -Type DWord -Value 0
|
|
|
|
# Enable Feedback
|
|
# Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Siuf\Rules" -Name "NumberOfSIUFInPeriod"
|
|
|
|
# Disable Advertising ID
|
|
Write-Host "Disabling Advertising ID..."
|
|
If (!(Test-Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo")) {
|
|
New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" | Out-Null
|
|
}
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" -Name "Enabled" -Type DWord -Value 0
|
|
|
|
# Enable Advertising ID
|
|
# Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" -Name "Enabled"
|
|
|
|
# Disable Cortana
|
|
Write-Host "Disabling Cortana..."
|
|
If (!(Test-Path "HKCU:\Software\Microsoft\Personalization\Settings")) {
|
|
New-Item -Path "HKCU:\Software\Microsoft\Personalization\Settings" -Force | Out-Null
|
|
}
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Personalization\Settings" -Name "AcceptedPrivacyPolicy" -Type DWord -Value 0
|
|
If (!(Test-Path "HKCU:\Software\Microsoft\InputPersonalization")) {
|
|
New-Item -Path "HKCU:\Software\Microsoft\InputPersonalization" -Force | Out-Null
|
|
}
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\InputPersonalization" -Name "RestrictImplicitTextCollection" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\InputPersonalization" -Name "RestrictImplicitInkCollection" -Type DWord -Value 1
|
|
If (!(Test-Path "HKCU:\Software\Microsoft\InputPersonalization\TrainedDataStore")) {
|
|
New-Item -Path "HKCU:\Software\Microsoft\InputPersonalization\TrainedDataStore" -Force | Out-Null
|
|
}
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\InputPersonalization\TrainedDataStore" -Name "HarvestContacts" -Type DWord -Value 0
|
|
|
|
# Enable Cortana
|
|
# Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Personalization\Settings" -Name "AcceptedPrivacyPolicy"
|
|
# Set-ItemProperty -Path "HKCU:\Software\Microsoft\InputPersonalization" -Name "RestrictImplicitTextCollection" -Type DWord -Value 0
|
|
# Set-ItemProperty -Path "HKCU:\Software\Microsoft\InputPersonalization" -Name "RestrictImplicitInkCollection" -Type DWord -Value 0
|
|
# Remove-ItemProperty -Path "HKCU:\Software\Microsoft\InputPersonalization\TrainedDataStore" -Name "HarvestContacts"
|
|
|
|
# Restrict Windows Update P2P only to local network
|
|
Write-Host "Restricting Windows Update P2P only to local network..."
|
|
If (!(Test-Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization")) {
|
|
New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization" | Out-Null
|
|
}
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization" -Name "SystemSettingsDownloadMode" -Type DWord -Value 3
|
|
|
|
# Unrestrict Windows Update P2P
|
|
# Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization" -Name "SystemSettingsDownloadMode"
|
|
|
|
##########
|
|
# UI Tweaks
|
|
##########
|
|
|
|
# Disable Action Center
|
|
Write-Host "Disabling Action Center..."
|
|
If (!(Test-Path "HKCU:\Software\Policies\Microsoft\Windows\Explorer")) {
|
|
New-Item -Path "HKCU:\Software\Policies\Microsoft\Windows\Explorer" | Out-Null
|
|
}
|
|
Set-ItemProperty -Path "HKCU:\Software\Policies\Microsoft\Windows\Explorer" -Name "DisableNotificationCenter" -Type DWord -Value 1
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "ToastEnabled" -Type DWord -Value 0
|
|
|
|
# Enable Action Center
|
|
# Remove-ItemProperty -Path "HKCU:\Software\Policies\Microsoft\Windows\Explorer" -Name "DisableNotificationCenter"
|
|
# Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "ToastEnabled"
|
|
|
|
# Disable Autoplay
|
|
Write-Host "Disabling Autoplay..."
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers" -Name "DisableAutoplay" -Type DWord -Value 1
|
|
|
|
# Enable Autoplay
|
|
# Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers" -Name "DisableAutoplay" -Type DWord -Value 0
|
|
|
|
# Disable Autorun for all drives
|
|
Write-Host "Disabling Autorun for all drives..."
|
|
If (!(Test-Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer")) {
|
|
New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" | Out-Null
|
|
}
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoDriveTypeAutoRun" -Type DWord -Value 255
|
|
|
|
# Enable Autorun
|
|
# Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoDriveTypeAutoRun"
|
|
|
|
# Disable Sticky keys prompt
|
|
Write-Host "Disabling Sticky keys prompt..."
|
|
Set-ItemProperty -Path "HKCU:\Control Panel\Accessibility\StickyKeys" -Name "Flags" -Type String -Value "506"
|
|
|
|
# Enable Sticky keys prompt
|
|
# Set-ItemProperty -Path "HKCU:\Control Panel\Accessibility\StickyKeys" -Name "Flags" -Type String -Value "510"
|
|
|
|
# Hide Search button / box
|
|
Write-Host "Hiding Search Box / Button..."
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search" -Name "SearchboxTaskbarMode" -Type DWord -Value 0
|
|
|
|
# Show Search button / box
|
|
# Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search" -Name "SearchboxTaskbarMode"
|
|
|
|
# Hide Task View button
|
|
Write-Host "Hiding Task View button..."
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowTaskViewButton" -Type DWord -Value 0
|
|
|
|
# Show Task View button
|
|
# Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowTaskViewButton"
|
|
|
|
# Show small icons in taskbar
|
|
# Write-Host "Showing small icons in taskbar..."
|
|
# Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarSmallIcons" -Type DWord -Value 1
|
|
|
|
# Show large icons in taskbar
|
|
# Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarSmallIcons"
|
|
|
|
# Show titles in taskbar
|
|
# Write-Host "Showing titles in taskbar..."
|
|
# Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarGlomLevel" -Type DWord -Value 1
|
|
|
|
# Hide titles in taskbar
|
|
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarGlomLevel"
|
|
|
|
# Show all tray icons
|
|
# Write-Host "Showing all tray icons..."
|
|
# Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer" -Name "EnableAutoTray" -Type DWord -Value 0
|
|
|
|
# Hide tray icons as needed
|
|
# Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer" -Name "EnableAutoTray"
|
|
|
|
# Show known file extensions
|
|
Write-Host "Showing known file extensions..."
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "HideFileExt" -Type DWord -Value 0
|
|
|
|
# Hide known file extensions
|
|
# Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "HideFileExt" -Type DWord -Value 1
|
|
|
|
# Show hidden files
|
|
# Write-Host "Showing hidden files..."
|
|
# Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "Hidden" -Type DWord -Value 1
|
|
|
|
# Hide hidden files
|
|
# Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "Hidden" -Type DWord -Value 2
|
|
|
|
# Change default Explorer view to "Computer"
|
|
Write-Host "Changing default Explorer view to `"Computer`"..."
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "LaunchTo" -Type DWord -Value 1
|
|
|
|
# Change default Explorer view to "Quick Access"
|
|
# Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "LaunchTo"
|
|
|
|
# Show Computer shortcut on desktop
|
|
# Write-Host "Showing Computer shortcut on desktop..."
|
|
# If (!(Test-Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu")) {
|
|
# New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" | Out-Null
|
|
# }
|
|
# Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" -Name "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" -Type DWord -Value 0
|
|
# Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" -Type DWord -Value 0
|
|
|
|
# Hide Computer shortcut from desktop
|
|
# Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" -Name "{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
|
|
# Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
|
|
|
|
## Add secondary en-US keyboard
|
|
#Write-Host "Adding secondary en-US keyboard..."
|
|
#$langs = Get-WinUserLanguageList
|
|
#$langs.Add("en-US")
|
|
#Set-WinUserLanguageList $langs -Force
|
|
|
|
# Remove secondary en-US keyboard
|
|
# $langs = Get-WinUserLanguageList
|
|
# Set-WinUserLanguageList ($langs | ? {$_.LanguageTag -ne "en-US"}) -Force
|
|
|
|
|
|
##########
|
|
# Remove unwanted applications
|
|
##########
|
|
|
|
# Uninstall default Microsoft applications
|
|
Write-Host "Uninstalling default Microsoft applications..."
|
|
Get-AppxPackage "Microsoft.3DBuilder" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.BingFinance" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.BingNews" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.BingSports" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.BingWeather" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.Getstarted" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.MicrosoftOfficeHub" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.MicrosoftSolitaireCollection" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.Office.OneNote" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.People" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.SkypeApp" | Remove-AppxPackage
|
|
# Get-AppxPackage "Microsoft.Windows.Photos" | Remove-AppxPackage
|
|
# Get-AppxPackage "Microsoft.WindowsAlarms" | Remove-AppxPackage
|
|
# Get-AppxPackage "Microsoft.WindowsCamera" | Remove-AppxPackage
|
|
Get-AppxPackage "microsoft.windowscommunicationsapps" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.WindowsMaps" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.WindowsPhone" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.WindowsSoundRecorder" | Remove-AppxPackage
|
|
# Get-AppxPackage "Microsoft.XboxApp" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.ZuneMusic" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.ZuneVideo" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.AppConnector" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.ConnectivityStore" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.Office.Sway" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.Messaging" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.CommsPhone" | Remove-AppxPackage
|
|
Get-AppxPackage "9E2F88E3.Twitter" | Remove-AppxPackage
|
|
Get-AppxPackage "king.com.CandyCrushSodaSaga" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.WindowsFeedbackHub" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.Wallet" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.ScreenSketch" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.GetHelp" | Remove-AppxPackage
|
|
# Get-AppxPackage "Microsoft.Xbox.TCUI" | Remove-AppxPackage
|
|
# Get-AppxPackage "Microsoft.XboxGameOverlay" | Remove-AppxPackage
|
|
# Get-AppxPackage "Microsoft.XboxSpeechToTextOverlay" | Remove-AppxPackage
|
|
Get-AppxPackage "Microsoft.MixedReality.Portal" | Remove-AppxPackage
|
|
# Get-AppBackgroundTask "Microsoft.XboxIdentityProvider" | Remove-AppPackage
|
|
|
|
|
|
# Install default Microsoft applications
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.3DBuilder").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.BingFinance").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.BingNews").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.BingSports").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.BingWeather").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.Getstarted").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.MicrosoftOfficeHub").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.MicrosoftSolitaireCollection").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.Office.OneNote").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.People").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.SkypeApp").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.Windows.Photos").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.WindowsAlarms").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.WindowsCamera").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.windowscommunicationsapps").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.WindowsMaps").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.WindowsPhone").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.WindowsSoundRecorder").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.XboxApp").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.ZuneMusic").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.ZuneVideo").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.AppConnector").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.ConnectivityStore").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.Office.Sway").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.Messaging").InstallLocation)\AppXManifest.xml"
|
|
# Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppXPackage -AllUsers "Microsoft.CommsPhone").InstallLocation)\AppXManifest.xml"
|
|
# In case you have removed them for good, you can try to restore the files using installation medium as follows
|
|
# New-Item C:\Mnt -Type Directory | Out-Null
|
|
# dism /Mount-Image /ImageFile:D:\sources\install.wim /index:1 /ReadOnly /MountDir:C:\Mnt
|
|
# robocopy /S /SEC /R:0 "C:\Mnt\Program Files\WindowsApps" "C:\Program Files\WindowsApps"
|
|
# dism /Unmount-Image /Discard /MountDir:C:\Mnt
|
|
# Remove-Item -Path C:\Mnt -Recurse
|
|
|
|
# Prevents Apps from re-installing
|
|
$cdm = @(
|
|
"ContentDeliveryAllowed"
|
|
"FeatureManagementEnabled"
|
|
"OemPreInstalledAppsEnabled"
|
|
"PreInstalledAppsEnabled"
|
|
"PreInstalledAppsEverEnabled"
|
|
"SilentInstalledAppsEnabled"
|
|
"SubscribedContent-314559Enabled"
|
|
"SubscribedContent-338387Enabled"
|
|
"SubscribedContent-338388Enabled"
|
|
"SubscribedContent-338389Enabled"
|
|
"SubscribedContent-338393Enabled"
|
|
"SubscribedContentEnabled"
|
|
"SystemPaneSuggestionsEnabled"
|
|
)
|
|
|
|
New-FolderForced -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"
|
|
foreach ($key in $cdm) {
|
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" $key 0
|
|
}
|
|
|
|
# Disable Privacy Settings Experience #
|
|
# Also disables all settings in Privacy Experience #
|
|
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Speech_OneCore\Settings\OnlineSpeechPrivacy" /v "HasAccepted" /f
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Speech_OneCore" /f
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Speech_OneCore\Settings" /f
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Speech_OneCore\Settings\OnlineSpeechPrivacy" /v "HasAccepted" /t REG_DWORD /d "0" /f
|
|
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" /v "Value" /f
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager" /f
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore" /f
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" /v "Value" /t REG_SZ /d "Deny" /f
|
|
reg delete "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack" /v "ShowedToastAtLevel" /f
|
|
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Diagnostics" /f
|
|
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack" /f
|
|
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack" /v "ShowedToastAtLevel" /t REG_DWORD /d "1" /f
|
|
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Input\TIPC" /v "Enabled" /f
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Input" /f
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Input\TIPC" /f
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Input\TIPC" /v "Enabled" /t REG_DWORD /d "0" /f
|
|
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Privacy" /v "TailoredExperiencesWithDiagnosticDataEnabled" /f
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Privacy" /f
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Privacy" /v "TailoredExperiencesWithDiagnosticDataEnabled" /t REG_DWORD /d "0" /f
|
|
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v "Enabled" /f
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /f
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v "Enabled" /t REG_DWORD /d "0" /f
|
|
|
|
|
|
# Set Windows to Dark Mode #
|
|
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes" /f
|
|
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" /f
|
|
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v "AppsUseLightTheme" /t "REG_DWORD" /d "0" /f
|
|
reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v "SystemUsesLightTheme" /t "REG_DWORD" /d "0" /f
|
|
|
|
#Restart Explorer
|
|
Stop-Process -name explorer
|
|
Start-Sleep -s 5
|