Нет описания

DebloatWindowsTEST2.ps1 2.1KB

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

Powered by TurnKey Linux.