123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- #Disables Windows Feedback Experience
- Write-Output "Disabling Windows Feedback Experience program"
- $Advertising = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo"
- If (Test-Path $Advertising) {
- Set-ItemProperty $Advertising Enabled -Value 0
- }
-
- #Stops Cortana from being used as part of your Windows Search Function
- Write-Output "Stopping Cortana from being used as part of your Windows Search Function"
- $Search = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search"
- If (Test-Path $Search) {
- Set-ItemProperty $Search AllowCortana -Value 0
- }
- #Disables Web Search in Start Menu
- Write-Output "Disabling Bing Search in Start Menu"
- $WebSearch = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search"
- Set-ItemProperty "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" BingSearchEnabled -Value 0
- If (!(Test-Path $WebSearch)) {
- New-Item $WebSearch
- }
- Set-ItemProperty $WebSearch DisableWebSearch -Value 1
-
- #Stops the Windows Feedback Experience from sending anonymous data
- Write-Output "Stopping the Windows Feedback Experience program"
- $Period = "HKCU:\Software\Microsoft\Siuf\Rules"
- If (!(Test-Path $Period)) {
- New-Item $Period
- }
- Set-ItemProperty $Period PeriodInNanoSeconds -Value 0
- #Prevents bloatware applications from returning and removes Start Menu suggestions
- Write-Output "Adding Registry key to prevent bloatware apps from returning"
- $registryPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent"
- $registryOEM = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"
- If (!(Test-Path $registryPath)) {
- New-Item $registryPath
- }
- Set-ItemProperty $registryPath DisableWindowsConsumerFeatures -Value 1
- If (!(Test-Path $registryOEM)) {
- New-Item $registryOEM
- }
- Set-ItemProperty $registryOEM ContentDeliveryAllowed -Value 0
- Set-ItemProperty $registryOEM OemPreInstalledAppsEnabled -Value 0
- Set-ItemProperty $registryOEM PreInstalledAppsEnabled -Value 0
- Set-ItemProperty $registryOEM PreInstalledAppsEverEnabled -Value 0
- Set-ItemProperty $registryOEM SilentInstalledAppsEnabled -Value 0
- Set-ItemProperty $registryOEM SystemPaneSuggestionsEnabled -Value 0
-
- #Preping mixed Reality Portal for removal
- Write-Output "Setting Mixed Reality Portal value to 0 so that you can uninstall it in Settings"
- $Holo = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Holographic"
- If (Test-Path $Holo) {
- Set-ItemProperty $Holo FirstRunSucceeded -Value 0
- }
- #Disables Wi-fi Sense
- Write-Output "Disabling Wi-Fi Sense"
- $WifiSense1 = "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting"
- $WifiSense2 = "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots"
- $WifiSense3 = "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\config"
- If (!(Test-Path $WifiSense1)) {
- New-Item $WifiSense1
- }
- Set-ItemProperty $WifiSense1 Value -Value 0
- If (!(Test-Path $WifiSense2)) {
- New-Item $WifiSense2
- }
- Set-ItemProperty $WifiSense2 Value -Value 0
- Set-ItemProperty $WifiSense3 AutoConnectAllowedOEM -Value 0
-
- #Disables live tiles
- Write-Output "Disabling live tiles"
- $Live = "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications"
- If (!(Test-Path $Live)) {
- New-Item $Live
- }
- Set-ItemProperty $Live NoTileApplicationNotification -Value 1
-
- #Turns off Data Collection via the AllowTelemtry key by changing it to 0
- Write-Output "Turning off Data Collection"
- $DataCollection1 = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection"
- $DataCollection2 = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection"
- $DataCollection3 = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Policies\DataCollection"
- If (Test-Path $DataCollection1) {
- Set-ItemProperty $DataCollection1 AllowTelemetry -Value 0
- }
- If (Test-Path $DataCollection2) {
- Set-ItemProperty $DataCollection2 AllowTelemetry -Value 0
- }
- If (Test-Path $DataCollection3) {
- Set-ItemProperty $DataCollection3 AllowTelemetry -Value 0
- }
-
- #Disabling Location Tracking
- Write-Output "Disabling Location Tracking"
- $SensorState = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}"
- $LocationConfig = "HKLM:\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration"
- If (!(Test-Path $SensorState)) {
- New-Item $SensorState
- }
- Set-ItemProperty $SensorState SensorPermissionState -Value 0
- If (!(Test-Path $LocationConfig)) {
- New-Item $LocationConfig
- }
- Set-ItemProperty $LocationConfig Status -Value 0
-
- #Disables People icon on Taskbar
- Write-Output "Disabling People icon on Taskbar"
- $People = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People"
- If (!(Test-Path $People)) {
- New-Item $People
- }
- Set-ItemProperty $People PeopleBand -Value 0
-
- #Disables scheduled tasks that are considered unnecessary
- Write-Output "Disabling scheduled tasks"
- Get-ScheduledTask XblGameSaveTaskLogon | Disable-ScheduledTask
- Get-ScheduledTask XblGameSaveTask | Disable-ScheduledTask
- Get-ScheduledTask Consolidator | Disable-ScheduledTask
- Get-ScheduledTask UsbCeip | Disable-ScheduledTask
- Get-ScheduledTask DmClient | Disable-ScheduledTask
- Get-ScheduledTask DmClientOnScenarioDownload | Disable-ScheduledTask
-
- Write-Output "Stopping and disabling WAP Push Service"
- #Stop and disable WAP Push Service
- Stop-Service "dmwappushservice"
- Set-Service "dmwappushservice" -StartupType Disabled
- Write-Output "Stopping and disabling Diagnostics Tracking Service"
- #Disabling the Diagnostics Tracking Service
- Stop-Service "DiagTrack"
- Set-Service "DiagTrack" -StartupType Disabled
|