Powershell script to set winodws 10 services to default.

Powershell script to set winodws 10 services to default.

  • Hi there and welcome to PC Help Forum (PCHF), a more effective way to get the Tech Support you need!
    We have Experts in all areas of Tech, including Malware Removal, Crash Fixing and BSOD's , Microsoft Windows, Computer DIY and PC Hardware, Networking, Gaming, Tablets and iPads, General and Specific Software Support and so much more.

    Why not Click Here To Sign Up and start enjoying great FREE Tech Support.

    This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

This script will set windows 10 services to their default settings.​


This script will also create a restore point prior to changing the services.

To run this one your machine.

Method 1: Direct PowerShell Execution

  • Open PowerShell as Administrator
  • Right-click PowerShell
  • Select "Run as Administrator"
  • Copy the Entire Script
  • Paste into Powershell.
  • Press Enter to Run

Method 2: Save as PS1 File

  • Open Notepad
  • Paste the Complete Script
  • Save As:
  • File Name: Reset-Windows10Services.ps1
  • Save Location: Desktop or Documents
  • Encoding: UTF-8
  • Right click run with Powershell.


Code:
# Set Execution Policy
try {
    Set-ExecutionPolicy RemoteSigned -Force -ErrorAction Stop
    Write-Host "Execution Policy set to RemoteSigned" -ForegroundColor Green
} catch {
    Write-Host "Failed to set Execution Policy: $_" -ForegroundColor Red
    [System.Windows.Forms.MessageBox]::Show(
        "Unable to modify Execution Policy. Please run as Administrator.",
        "Execution Policy Error",
        [System.Windows.Forms.MessageBoxButtons]::OK,
        [System.Windows.Forms.MessageBoxIcon]::Warning
    )
    return
}


Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing

function Reset-Windows10Services {
    # Ensure running as administrator
    if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
    {
        [System.Windows.Forms.MessageBox]::Show("Please run this script as an Administrator", "Error", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Error)
        return
    }

    # Create a system restore point
    try {
        Checkpoint-Computer -Description "Before Windows Services Reset" -ErrorAction Stop
        Write-Host "System restore point created successfully." -ForegroundColor Green
    } catch {
        Write-Host "Failed to create system restore point: $_" -ForegroundColor Yellow
    }

    # Confirmation dialog
    $confirmation = [System.Windows.Forms.MessageBox]::Show(
        "Are you sure you want to reset Windows services to their default settings?`n`nWARNING: This may affect system functionality.",
        "Confirm Reset",
        [System.Windows.Forms.MessageBoxButtons]::YesNo,
        [System.Windows.Forms.MessageBoxIcon]::Warning
    )

    if ($confirmation -eq 'No') {
        Write-Host "Service reset cancelled." -ForegroundColor Yellow
        return
    }

    # Comprehensive services list
   
    $services = @(
        @{Name="AxInstSV"; StartupType="Manual"},
        @{Name="AJRouter"; StartupType="Manual"},
        @{Name="AppReadiness"; StartupType="Manual"},
        @{Name="AppIDSvc"; StartupType="Manual"},
        @{Name="Appinfo"; StartupType="Manual"},
        @{Name="ALG"; StartupType="Manual"},
        @{Name="AppMgmt"; StartupType="Manual"},
        @{Name="AppXSvc"; StartupType="Manual"},
        @{Name="AssignedAccessManagerSvc"; StartupType="Manual"},
        @{Name="tzautoupdate"; StartupType="Manual"},
        @{Name="BthAvctpSvc"; StartupType="Manual"},
        @{Name="BITS"; StartupType="Automatic"},
        @{Name="BrokerInfrastructure"; StartupType="Automatic"},
        @{Name="BFE"; StartupType="Automatic"},
        @{Name="BDESVC"; StartupType="Manual"},
        @{Name="wbengine"; StartupType="Manual"},
        @{Name="BTAGService"; StartupType="Manual"},
        @{Name="bthserv"; StartupType="Manual"},
        @{Name="PeerDistSvc"; StartupType="Manual"},
        @{Name="camsvc"; StartupType="Manual"},
        @{Name="CertPropSvc"; StartupType="Manual"},
        @{Name="ClipSVC"; StartupType="Manual"},
        @{Name="KeyIso"; StartupType="Manual"},
        @{Name="EventSystem"; StartupType="Automatic"},
        @{Name="COMSysApp"; StartupType="Manual"},
        @{Name="Browser"; StartupType="Manual"},
        @{Name="CDPSvc"; StartupType="Automatic"},
        @{Name="DiagTrack"; StartupType="Automatic"},
        @{Name="CoreMessagingRegistrar"; StartupType="Automatic"},
        @{Name="VaultSvc"; StartupType="Manual"},
        @{Name="CryptSvc"; StartupType="Automatic"},
        @{Name="DsSvc"; StartupType="Manual"},
        @{Name="DusmSvc"; StartupType="Automatic"},
        @{Name="DcomLaunch"; StartupType="Automatic"},
        @{Name="DoSvc"; StartupType="Automatic"},
        @{Name="DeviceAssociationService"; StartupType="Automatic"},
        @{Name="DeviceInstall"; StartupType="Manual"},
        @{Name="DmEnrollmentSvc"; StartupType="Manual"},
        @{Name="dmwappushservice"; StartupType="Manual"},
        @{Name="Dhcp"; StartupType="Automatic"},
        @{Name="diagsvc"; StartupType="Manual"},
        @{Name="DPS"; StartupType="Automatic"},
        @{Name="WdiServiceHost"; StartupType="Manual"},
        @{Name="WdiSystemHost"; StartupType="Manual"},
        @{Name="TrkWks"; StartupType="Automatic"},
        @{Name="MSDTC"; StartupType="Manual"},
        @{Name="Dnscache"; StartupType="Automatic"},
        @{Name="MapsBroker"; StartupType="Automatic"},
        @{Name="EFS"; StartupType="Manual"},
        @{Name="EapHost"; StartupType="Manual"},
        @{Name="Fax"; StartupType="Manual"},
        @{Name="fhsvc"; StartupType="Manual"},
        @{Name="fdPHost"; StartupType="Manual"},
        @{Name="FDResPub"; StartupType="Manual"},
        @{Name="gpsvc"; StartupType="Automatic"},
        @{Name="hns"; StartupType="Manual"},
        @{Name="hidserv"; StartupType="Manual"},
        @{Name="IKEEXT"; StartupType="Manual"},
        @{Name="SharedAccess"; StartupType="Manual"},
        @{Name="iphlpsvc"; StartupType="Automatic"},
        @{Name="IpxlatCfgSvc"; StartupType="Manual"},
        @{Name="PolicyAgent"; StartupType="Manual"},
        @{Name="KtmRm"; StartupType="Manual"},
        @{Name="lltdsvc"; StartupType="Manual"},
        @{Name="wlpasvc"; StartupType="Manual"},
        @{Name="LSM"; StartupType="Automatic"},
        @{Name="diagnosticshub.standardcollector.service"; StartupType="Manual"},
        @{Name="wlidsvc"; StartupType="Manual"},
        @{Name="AppVClient"; StartupType="Disabled"},
        @{Name="MSiSCSI"; StartupType="Manual"},
        @{Name="NgcSvc"; StartupType="Manual"},
        @{Name="NgcCtnrSvc"; StartupType="Manual"},
        @{Name="swprv"; StartupType="Manual"},
        @{Name="smphost"; StartupType="Manual"},
        @{Name="InstallService"; StartupType="Manual"},
        @{Name="SmsRouter"; StartupType="Manual"},
        @{Name="NaturalAuthentication"; StartupType="Manual"},
        @{Name="NetTcpPortSharing"; StartupType="Disabled"},
        @{Name="Netlogon"; StartupType="Manual"},
        @{Name="NcdAutoSetup"; StartupType="Manual"},
        @{Name="NcbService"; StartupType="Manual"},
        @{Name="Netman"; StartupType="Manual"},
        @{Name="NcaSvc"; StartupType="Manual"},
        @{Name="netprofm"; StartupType="Manual"},
        @{Name="NlaSvc"; StartupType="Automatic"},
        @{Name="NetSetupSvc"; StartupType="Manual"},
        @{Name="nsi"; StartupType="Automatic"},
        @{Name="CscService"; StartupType="Manual"},
        @{Name="ssh-agent"; StartupType="Disabled"},
        @{Name="defragsvc"; StartupType="Manual"},
        @{Name="WpcMonSvc"; StartupType="Manual"},
        @{Name="SEMgrSvc"; StartupType="Manual"},
        @{Name="PNRPsvc"; StartupType="Manual"},
        @{Name="p2psvc"; StartupType="Manual"},
        @{Name="p2pimsvc"; StartupType="Manual"},
        @{Name="PerfHost"; StartupType="Manual"},
        @{Name="pla"; StartupType="Manual"},
        @{Name="PhoneSvc"; StartupType="Manual"},
        @{Name="PlugPlay"; StartupType="Manual"},
        @{Name="PNRPAutoReg"; StartupType="Manual"},
        @{Name="WPDBusEnum"; StartupType="Manual"},
        @{Name="Power"; StartupType="Automatic"},
        @{Name="Spooler"; StartupType="Automatic"},
        @{Name="PrintNotify"; StartupType="Manual"},
        @{Name="wercplsupport"; StartupType="Manual"},
        @{Name="PcaSvc"; StartupType="Automatic"},
        @{Name="QWAVE"; StartupType="Manual"},
        @{Name="RmSvc"; StartupType="Manual"},
        @{Name="RasAuto"; StartupType="Manual"},
        @{Name="RasMan"; StartupType="Manual"},
        @{Name="SessionEnv"; StartupType="Manual"},
        @{Name="TermService"; StartupType="Manual"},
        @{Name="UmRdpService"; StartupType="Manual"},
        @{Name="RpcSs"; StartupType="Automatic"},
        @{Name="RpcLocator"; StartupType="Manual"},
        @{Name="RemoteRegistry"; StartupType="Disabled"},
        @{Name="RetailDemo"; StartupType="Manual"},
        @{Name="RemoteAccess"; StartupType="Disabled"},
        @{Name="RpcEptMapper"; StartupType="Automatic"},
        @{Name="seclogon"; StartupType="Manual"},
        @{Name="SstpSvc"; StartupType="Manual"},
        @{Name="SamSs"; StartupType="Automatic"},
        @{Name="wscsvc"; StartupType="Automatic"},
        @{Name="SensorDataService"; StartupType="Manual"},
        @{Name="SensrSvc"; StartupType="Manual"},
        @{Name="SensorService"; StartupType="Manual"},
        @{Name="LanmanServer"; StartupType="Automatic"},
        @{Name="shpamsvc"; StartupType="Disabled"},
        @{Name="ShellHWDetection"; StartupType="Automatic"},
        @{Name="SCardSvr"; StartupType="Disabled"},
        @{Name="ScDeviceEnum"; StartupType="Manual"},
        @{Name="SCPolicySvc"; StartupType="Manual"},
        @{Name="SNMPTRAP"; StartupType="Manual"},
        @{Name="sppsvc"; StartupType="Automatic"},
        @{Name="svsvc"; StartupType="Manual"},
        @{Name="SSDPSRV"; StartupType="Manual"},
        @{Name="StateRepository"; StartupType="Manual"},
        @{Name="WiaRpc"; StartupType="Manual"},
        @{Name="StorSvc"; StartupType="Manual"},
        @{Name="TieringEngineService"; StartupType="Manual"},
        @{Name="SysMain"; StartupType="Automatic"},
        @{Name="SENS"; StartupType="Automatic"},
        @{Name="SystemEventsBroker"; StartupType="Automatic"},
        @{Name="Schedule"; StartupType="Automatic"},
        @{Name="lmhosts"; StartupType="Automatic"},
        @{Name="TapiSrv"; StartupType="Manual"},
        @{Name="Themes"; StartupType="Automatic"},
        @{Name="TimeBrokerSvc"; StartupType="Manual"},
        @{Name="TabletInputService"; StartupType="Manual"},
        @{Name="UsoSvc"; StartupType="Automatic"},
        @{Name="upnphost"; StartupType="Manual"},
        @{Name="UserManager"; StartupType="Automatic"},
        @{Name="ProfSvc"; StartupType="Automatic"},
        @{Name="vds"; StartupType="Manual"},
        @{Name="VSS"; StartupType="Manual"},
        @{Name="WalletService"; StartupType="Manual"},
        @{Name="TokenBroker"; StartupType="Manual"},
        @{Name="WebClient"; StartupType="Manual"},
        @{Name="AudioSrv"; StartupType="Automatic"},
        @{Name="AudioEndpointBuilder"; StartupType="Automatic"},
        @{Name="SDRSVC"; StartupType="Manual"},
        @{Name="WbioSrvc"; StartupType="Automatic"},
        @{Name="WcsPlugInService"; StartupType="Manual"},
        @{Name="wcncsvc"; StartupType="Manual"},
        @{Name="Wcmsvc"; StartupType="Automatic"},
        @{Name="Sense"; StartupType="Manual"},
        @{Name="MpsSvc"; StartupType="Automatic"},
        @{Name="WEPHOSTSVC"; StartupType="Manual"},
        @{Name="WerSvc"; StartupType="Manual"},
        @{Name="Wecsvc"; StartupType="Manual"},
        @{Name="EventLog"; StartupType="Automatic"},
        @{Name="FontCache"; StartupType="Automatic"},
        @{Name="StiSvc"; StartupType="Automatic"},
        @{Name="wisvc"; StartupType="Manual"},
        @{Name="msiserver"; StartupType="Manual"},
        @{Name="LicenseManager"; StartupType="Manual"},
        @{Name="Winmgmt"; StartupType="Automatic"},
        @{Name="WManSvc"; StartupType="Manual"},
        @{Name="WMPNetworkSvc"; StartupType="Manual"},
        @{Name="icssvc"; StartupType="Manual"},
        @{Name="TrustedInstaller"; StartupType="Manual"},
        @{Name="spectrum"; StartupType="Manual"},
        @{Name="perceptionsimulation"; StartupType="Manual"},
        @{Name="FontCache3.0.0.0"; StartupType="Manual"},
        @{Name="WpnService"; StartupType="Manual"},
        @{Name="WinRM"; StartupType="Manual"},
        @{Name="WSearch"; StartupType="Automatic"},
        @{Name="SecurityHealthService"; StartupType="Manual"},
        @{Name="W32Time"; StartupType="Manual"},
        @{Name="wuauserv"; StartupType="Manual"},
        @{Name="WaaSMedicSvc"; StartupType="Manual"},
        @{Name="WinHttpAutoProxySvc"; StartupType="Manual"},
        @{Name="dot3svc"; StartupType="Manual"},
        @{Name="Wlansvc"; StartupType="Automatic"},
        @{Name="wmiApSrv"; StartupType="Manual"},
        @{Name="workfolderssvc"; StartupType="Manual"},
        @{Name="LanmanWorkstation"; StartupType="Automatic"},
        @{Name="WwanSvc"; StartupType="Manual"},
        @{Name="XboxGipSvc"; StartupType="Manual"},
        @{Name="XblAuthManager"; StartupType="Manual"},
        @{Name="XblGameSave"; StartupType="Manual"},
        @{Name="XboxNetApiSvc"; StartupType="Manual"}
    )

    # Logging setup
    $logPath = "$env:USERPROFILE\Desktop\ServiceReset_$(Get-Date -Format 'yyyyMMdd_HHmmss').log"
    $successCount = 0
    $failedServices = @()

    # Service reset loop
    foreach ($service in $services) {
        try {
            Set-Service -Name $service.Name -StartupType $service.StartupType -ErrorAction Stop
            Write-Host "Service $($service.Name) set to $($service.StartupType)" -ForegroundColor Green
            "$($service.Name) set to $($service.StartupType)" | Out-File -Append -FilePath $logPath
            $successCount++
        } catch {
            Write-Host "Failed to set service $($service.Name): $($_.Exception.Message)" -ForegroundColor Red
            $failedServices += $service.Name
        }
    }

    # Final summary message
    $summaryMessage = "Service Reset Complete!`n`n" +
                      "Total Services Processed: $($services.Count)`n" +
                      "Successfully Modified: $successCount`n" +
                      "Failed Services: $($failedServices.Count)`n`n" +
                      "A detailed log has been saved to:`n$logPath"

    [System.Windows.Forms.MessageBox]::Show(
        $summaryMessage,
        "Reset Complete",
        [System.Windows.Forms.MessageBoxButtons]::OK,
        [System.Windows.Forms.MessageBoxIcon]::Information
    )

    # Optional: Open log file
    if (Test-Path $logPath) {
        Start-Process notepad.exe $logPath
    }
}

# Call the function
Reset-Windows10Services
Author
Malnutrition
Views
52
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from Malnutrition