123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- @echo off
-
- if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
- {
- Start-Process PowerShell.exe "-NoProfile -ExecutionPolicy Bypass -Command [System.Diagnostics.Process]::Start((New-Object System.Diagnostics.ProcessStartInfo \"$PSCommandPath\",\"-Verb runAs\"))"
- exit
- }
-
-
- # Disable Windows services
- Set-Service -Name "DiagTrack" -StartupType Disabled
- Stop-Service -Name "DiagTrack"
-
- # Uninstall Smartbyte and its associated telemetry
- msiexec.exe /x {A0CDAD3D-0329-4E3E-8DC1-30E333D6564D} /quiet
-
- # Remove other built-in apps
- Get-AppxPackage *Microsoft.3DBuilder* | Remove-AppxPackage
- Get-AppxPackage *Microsoft.BingWeather* | Remove-AppxPackage
- Get-AppxPackage *Microsoft.Getstarted* | Remove-AppxPackage
- Get-AppxPackage *Microsoft.MicrosoftSolitaireCollection* | Remove-AppxPackage
- Get-AppxPackage *Microsoft.MicrosoftStickyNotes* | Remove-AppxPackage
- Get-AppxPackage *Microsoft.Office.OneNote* | Remove-AppxPackage
- Get-AppxPackage *Microsoft.People* | Remove-AppxPackage
- Get-AppxPackage *Microsoft.SkypeApp* | Remove-AppxPackage
- Get-AppxPackage *Microsoft.XboxApp* | Remove-AppxPackage
- Get-AppxPackage *Microsoft.ZuneMusic* | Remove-AppxPackage
- Get-AppxPackage *Microsoft.ZuneVideo* | Remove-AppxPackage
-
- # Install Google Chrome
- $Chrome = "https://dl.google.com/tag/s/appguid%3D%7B8A69D345-D564-463C-AFF1-A69D9E530F96%7D%26iid%3D%7B957D5128-B19B-45A8-A0DD-EE6B5862CAD9%7D%26lang%3Den%26browser%3D4%26usagestats%3D0%26appname%3DGoogle%2520Chrome%26needsadmin%3Dprefers%26ap%3Dx64-stable-statsdef_1%26installdataindex%3Dempty/update2/installers/ChromeStandaloneSetup64.exe"
-
- Invoke-WebRequest $Chrome -OutFile "$env:temp\ChromeStandaloneSetup64.exe"
-
- Start-Process "$env:temp\ChromeStandaloneSetup64.exe" -ArgumentList '/silent /install' -Wait
-
- # Install Firefox
- $Firefox = "https://download.mozilla.org/?product=firefox-latest&os=win64&lang=en-US"
-
- Invoke-WebRequest $Firefox -OutFile "$env:temp\FirefoxSetup.exe"
-
- Start-Process "$env:temp\FirefoxSetup.exe" -ArgumentList '/S' -Wait
-
- # Install Ublock Origin extension in Chrome
- $UblockOriginChrome = "https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm"
- Start-Process "Google Chrome" -ArgumentList $UblockOriginChrome
-
- # Install Ublock Origin extension in Firefox
- $UblockOriginFirefox = "https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/"
- Start-Process "Firefox" -ArgumentList $UblockOriginFirefox
-
- # Install Ublock Origin extension in Edge
- $UblockOriginEdge = "https://microsoftedge.microsoft.com/addons/detail/cjpalhdlnbpafiamejdnhcphjbkeiagm"
- Start-Process "MicrosoftEdge" -ArgumentList $UblockOriginEdge
-
- # Disable Windows and driver telemetry
- Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "AllowTelemetry" -Type DWORD -Value 0 -Force
-
- # Add registry key for PlatformAoAcOverride
- $registryPath = "HKLM:\SYSTEM\CurrentControlSet\Control\Power"
- New-Item -Path "$registryPath" -Name "PlatformAoAcOverride" -Force | Out-Null
- New-ItemProperty -Path "$registryPath" -Name "PlatformAoAcOverride" -Value 0 -PropertyType DWORD
-
- # Disable BitLocker services
- Stop-Service -Name "BDESVC"
- Set-Service -Name "BDESVC" -StartupType "Disabled"
|