Sfoglia il codice sorgente

Upload files to ''

nathan 2 anni fa
parent
commit
396bc9e736
1 ha cambiato i file con 47 aggiunte e 0 eliminazioni
  1. 47
    0
      DebloatWindowsTEST2.ps1

+ 47
- 0
DebloatWindowsTEST2.ps1 Vedi File

@@ -0,0 +1,47 @@
1
+@echo off
2
+
3
+if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
4
+{
5
+    Start-Process PowerShell.exe "-NoProfile -ExecutionPolicy Bypass -Command [System.Diagnostics.Process]::Start((New-Object System.Diagnostics.ProcessStartInfo \"$PSCommandPath\",\"-Verb runAs\"))"
6
+    exit
7
+}
8
+
9
+rem Disable Windows services
10
+sc config diagtrack start= disabled
11
+
12
+REM Remove other built-in apps
13
+Get-AppxPackage *Microsoft.3DBuilder* | Remove-AppxPackage
14
+Get-AppxPackage *Microsoft.BingWeather* | Remove-AppxPackage
15
+Get-AppxPackage *Microsoft.Getstarted* | Remove-AppxPackage
16
+Get-AppxPackage *Microsoft.MicrosoftSolitaireCollection* | Remove-AppxPackage
17
+Get-AppxPackage *Microsoft.MicrosoftStickyNotes* | Remove-AppxPackage
18
+Get-AppxPackage *Microsoft.Office.OneNote* | Remove-AppxPackage
19
+Get-AppxPackage *Microsoft.People* | Remove-AppxPackage
20
+Get-AppxPackage *Microsoft.SkypeApp* | Remove-AppxPackage
21
+Get-AppxPackage *Microsoft.XboxApp* | Remove-AppxPackage
22
+Get-AppxPackage *Microsoft.ZuneMusic* | Remove-AppxPackage
23
+Get-AppxPackage *Microsoft.ZuneVideo* | Remove-AppxPackage
24
+
25
+rem Disable AMD and NVIDIA telemetry
26
+sc config AMD Telemetry Client start= disabled
27
+sc config NVTelemetryContainer start= disabled
28
+sc config IntelTelemetryService start= disabled
29
+
30
+rem Disable Windows telemetry
31
+reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f
32
+
33
+rem Uninstall Smartbyte and its associated telemetry
34
+msiexec.exe /x {A0CDAD3D-0329-4E3E-8DC1-30E333D6564D} /quiet
35
+
36
+Invoke-WebRequest -Uri "https://github.com/microsoft/winget-cli/releases/download/v0.3.1170/Microsoft.Windows.Winget.Client.0.3.1170.msix" -OutFile "winget.msix"
37
+Start-Process "msixbundle.exe" -ArgumentList "install", "winget.msix" -Wait
38
+
39
+Write-Host "Winget has been installed successfully."
40
+Write-Host "Press any key to continue."
41
+
42
+$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
43
+
44
+rem Upgrade all installed Windows programs
45
+for /f "delims=" %a in ('winget list --installed') do winget upgrade %a
46
+
47
+pause

Powered by TurnKey Linux.