diff options
| author | seth <[email protected]> | 2024-03-06 17:12:26 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2024-03-06 17:12:26 -0500 |
| commit | a66edb771502d36c67e50977dca20b414e767f55 (patch) | |
| tree | e67ec5e85853cc2a9f1e4008714a5b43c41da8ac /disable_services.ps1 | |
| parent | a37c8e6da88389bf5030e1ae4ff601c29b6c2f03 (diff) | |
split up scripts
Diffstat (limited to 'disable_services.ps1')
| -rw-r--r-- | disable_services.ps1 | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/disable_services.ps1 b/disable_services.ps1 new file mode 100644 index 0000000..bbe4a1e --- /dev/null +++ b/disable_services.ps1 @@ -0,0 +1,39 @@ +<# +.SYNOPSIS + Disables automatic startup of unneeded services +.NOTES + Sourced from https://learn.microsoft.com/en-us/windows/iot/iot-enterprise/optimize/services +#> + +$ErrorActionPreference = "Stop" + + +$manualServices = @( + "CDPSvc" + "DiagTrack" + "MapsBroker" + "OneSyncSvc" + "RemoteRegistry" + "RetailDemo" +) + +foreach ($service in $manualServices) { + Write-Host -Message "Disabling $service" + Get-Service -Name $service -ErrorAction SilentlyContinue | Set-Service -StartupType Manual -ErrorAction SilentlyContinue +} + +$disabledServices = @( + "XboxGipSvc" + "XblAuthManager" + "XblGameSave" + "XboxNetApiSvc" +) + +# You probably don't want to do this, as it will break any and all xbox games :/ +# foreach ($service in $disabledServices) { +# Write-Host -Message "Disabling $service" +# Get-Service -Name $service -ErrorAction SilentlyContinue | Set-Service -StartupType Disabled -ErrorAction SilentlyContinue +# } + + +Write-Host "Done!" |
