Added button to Remove Xbox fully from Windows
- Once removed, to restore you need to download the apps and enable services manually - Refactored Remove UWP apps function into a module - Improve some output for the console - If Intel GPU detected will install DSA too, sorry if already installed on Intel CPU - Added Warning color to layoutmain
parent
5cdcceba8a
commit
658d4de61f
Binary file not shown.
Before Width: | Height: | Size: 226 KiB After Width: | Height: | Size: 225 KiB |
@ -0,0 +1,23 @@
|
||||
function Remove-UWPApps() {
|
||||
|
||||
[CmdletBinding()] #<<-- This turns a regular function into an advanced function
|
||||
param (
|
||||
[Array] $Apps
|
||||
)
|
||||
|
||||
ForEach ($Bloat in $Apps) {
|
||||
|
||||
If ((Get-AppxPackage -AllUsers -Name $Bloat) -or (Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like $Bloat)) {
|
||||
|
||||
Write-Host "[-][UWP] Trying to remove $Bloat ..."
|
||||
Get-AppxPackage -AllUsers -Name $Bloat | Remove-AppxPackage # App
|
||||
Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like $Bloat | Remove-AppxProvisionedPackage -Online -AllUsers # Payload
|
||||
|
||||
}
|
||||
Else {
|
||||
|
||||
Write-Warning "[?][UWP] $Bloat was already removed or not found."
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
function Main() {
|
||||
Write-Host "[-] Disabling Search Indexing (Recommended for HDDs)..."
|
||||
Get-Service -Name "WSearch" -ErrorAction SilentlyContinue | Set-Service -StartupType Disabled
|
||||
Stop-Service "WSearch" -Force -NoWait
|
||||
Write-Host "[-][Services] Disabling Search Indexing (Recommended for HDDs)..."
|
||||
Get-Service -Name "WSearch" -ErrorAction SilentlyContinue | Set-Service -StartupType Disabled
|
||||
Stop-Service "WSearch" -Force -NoWait
|
||||
}
|
||||
|
||||
Main
|
@ -1,7 +1,7 @@
|
||||
function Main() {
|
||||
Write-Host "[+] Enabling Search Indexing (Recommended for SSDs)..."
|
||||
Get-Service -Name "WSearch" -ErrorAction SilentlyContinue | Set-Service -StartupType Automatic
|
||||
Start-Service "WSearch"
|
||||
Write-Host "[+][Services] Enabling Search Indexing (Recommended for SSDs)..."
|
||||
Get-Service -Name "WSearch" -ErrorAction SilentlyContinue | Set-Service -StartupType Automatic
|
||||
Start-Service "WSearch"
|
||||
}
|
||||
|
||||
Main
|
@ -0,0 +1,63 @@
|
||||
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"remove-uwp-apps.psm1"
|
||||
|
||||
function Remove-Xbox() {
|
||||
|
||||
$Global:PathToLMPoliciesGameDVR = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR"
|
||||
|
||||
$Ask = "This will remove all Xbox apps
|
||||
and Disable Xbox services (Except from Accessories)"
|
||||
|
||||
switch (Show-Question -Title "Warning" -Message $Ask) {
|
||||
'Yes' {
|
||||
|
||||
Write-Host "[-][Services] Disabling Xbox Services (Except from Accessories)..."
|
||||
Get-Service -Name "XblAuthManager" -ErrorAction SilentlyContinue | Set-Service -StartupType Disabled
|
||||
Get-Service -Name "XblGameSave" -ErrorAction SilentlyContinue | Set-Service -StartupType Disabled
|
||||
Get-Service -Name "XboxNetApiSvc" -ErrorAction SilentlyContinue | Set-Service -StartupType Disabled
|
||||
Stop-Service "XblAuthManager" -Force -NoWait
|
||||
Stop-Service "XblGameSave" -Force -NoWait
|
||||
Stop-Service "XboxNetApiSvc" -Force -NoWait
|
||||
# Only disable if you'll not get ANY Xbox Accessory (Xbox Wireless Controller, Xbox Wireless Receiver, Steering Wheel, etc.)
|
||||
#Get-Service -Name "XboxGipSvc" -ErrorAction SilentlyContinue | Set-Service -StartupType Disabled
|
||||
#Stop-Service "XboxGipSvc" -Force -NoWait
|
||||
|
||||
Write-Host "[-][UWP] Wiping Xbox completely from Windows..."
|
||||
$XboxApps = @(
|
||||
"Microsoft.XboxApp" # Xbox Console Companion (Replaced by new App)
|
||||
"Microsoft.XboxGameCallableUI"
|
||||
"Microsoft.XboxGameOverlay"
|
||||
"Microsoft.XboxSpeechToTextOverlay"
|
||||
"Microsoft.XboxGamingOverlay" # Xbox Game Bar
|
||||
"Microsoft.XboxIdentityProvider" # Xbox Identity Provider (Xbox Dependency)
|
||||
"Microsoft.Xbox.TCUI" # Xbox Live API communication (Xbox Dependency)
|
||||
)
|
||||
|
||||
Remove-UWPApps -Apps $XboxApps
|
||||
|
||||
Write-Host "[-][Priv&Perf] Disabling Xbox Game Bar & Game DVR..."
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\ApplicationManagement\AllowGameDVR" -Name "value" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" -Name "AppCaptureEnabled" -Type DWord -Value 0
|
||||
Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_Enabled" -Type DWord -Value 0
|
||||
If (!(Test-Path "$PathToLMPoliciesGameDVR")) {
|
||||
New-Item -Path "$PathToLMPoliciesGameDVR" -Force | Out-Null
|
||||
}
|
||||
Set-ItemProperty -Path "$PathToLMPoliciesGameDVR" -Name "AllowGameDVR" -Type DWord -Value 0
|
||||
|
||||
}
|
||||
'No' {
|
||||
Write-Host "You choose No. (No = Cancel)"
|
||||
}
|
||||
'Cancel' {
|
||||
# With Yes, No and Cancel, the user can press Esc to exit
|
||||
Write-Host "You choose Cancel. (Cancel = No)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Main() {
|
||||
|
||||
Remove-Xbox # Remove all Xbox related Apps, services, etc.
|
||||
|
||||
}
|
||||
|
||||
Main
|
Loading…
Reference in New Issue