Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ########################################################################################################################
- #=====[ Services ]=====#
- ########################################################################################################################
- # Disable Service Known to cause issues
- $Services = @(
- # unnecessary services
- "sysmain"
- "WpnService"
- "WSearch"
- "DiagTrack"
- "diagnosticshub.standardcollector.service"
- "ClicktoRunSvc"
- "dmwappushservice"
- "HomeGroupListener"
- "HomeGroupProvider"
- "RetailDemo"
- "lfsvc"
- "MapsBroker"
- "OneSyncSvc"
- "XblAuthManager"
- "XblGameSave"
- "XboxNetApiSvc"
- "WerSvc"
- )
- foreach ($Service in $Services) {
- Set-Service -Name $Service -StartupType Disabled -EA SilentlyContinue
- Write-Host "Setting $Service to disabled."
- Stop-Service -Name $Service -Force -Confirm:$false -EA SilentlyContinue
- Write-Host "Stopping $Service..."
- }
- #Disabling the Diagnostics Tracking Service
- cmd /c sc delete DiagTrack -EA SilentlyContinue
- cmd /c sc delete dmwappushservice -EA SilentlyContinue
- cmd /c sc delete diagnosticshub.standardcollector.service -EA SilentlyContinue
- # Ensure Windows Update services are started properly.
- $UpdateServices= @(
- # Update Services
- "wuauserv"
- "bits"
- )
- foreach ($UpdateService in $UpdateServices) {
- Stop-Service -Name $UpdateService -Force -Confirm:$false -EA SilentlyContinue
- Write-Host "Stopping $UpdateService..."
- Set-Service -Name $UpdateService -StartupType Automatic
- Write-Host "Setting $UpdateService to automatic."
- Start-Service -Name $UpdateService
- Write-Host "Starting $UpdateService..."}
- ### Kill Windows Search UI
- Stop-Process -Name "SearchUi.exe" -Force -EA SilentlyContinue
- $Currentlocation = (Get-Location).path
- cd $env:windir\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy
- takeown /f SearchUI.exe
- icacls SearchUI.exe /grant administrators:F
- Stop-Process -Name "SearchUi.exe" -Force -EA SilentlyContinue
- cmd /c rename SearchUI.exe SearchUI.exe.001
- cd $Currentlocation
Advertisement
Add Comment
Please, Sign In to add comment