How to Fix “Error 87: The Parameter is Incorrect” When Modifying Windows Service Properties (OneSyncSvc/Sync Host Example)


2 views

Many Windows administrators encounter Error 87 when attempting to modify service configurations through the Services management console. Let's examine a specific case with OneSyncSvc_1e21e (Sync Host service):

Service Name: OneSyncSvc_1e21e
Path: C:\WINDOWS\system32\svchost.exe -k UnistackSvcGroup
Startup Type: Automatic (Delayed Start)

The error typically occurs due to:

  • Service being protected by TrustedInstaller
  • Corrupted service registry entries
  • Group Policy restrictions
  • Windows Defender or other security software interference

Try these methods in order of complexity:

1. Using SC Command

sc config OneSyncSvc_1e21e start= demand
sc qc OneSyncSvc_1e21e

2. PowerShell Approach

Set-Service -Name OneSyncSvc_1e21e -StartupType Manual
# For complete removal (admin rights required):
Get-WmiObject -Class Win32_Service -Filter "Name='OneSyncSvc_1e21e'" | Remove-WmiObject

If standard methods fail, edit the registry carefully:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OneSyncSvc_1e21e]
"Start"=dword:00000003
"DelayedAutostart"=dword:00000000
  • Run Process Explorer to check service dependencies
  • Verify system file integrity: sfc /scannow
  • Check event logs for related errors
  • Try safe mode modifications

If permanent modification isn't possible, consider:

# Temporary disable (until next reboot):
sc stop OneSyncSvc_1e21e
sc config OneSyncSvc_1e21e start= disabled

For enterprise environments, create a Group Policy Preference to manage the service configuration across multiple machines.


The "Error 87: The parameter is incorrect" typically occurs when trying to modify protected Windows services through the Services GUI. This is particularly common with modern Windows services that are managed through Service Control Manager (SCM) with additional security layers.

The Sync Host service (OneSyncSvc_*) is a core Windows component that handles UWP app synchronization. Microsoft implements special protection for such services through:

  • Virtualization of service instances per user (notice the _1e21e suffix)
  • Dependency on the UnistackSvcGroup
  • Group Policy protections
  • Windows Defender Application Control (WDAC) restrictions

While you can't directly modify the service through GUI, these methods work:

Method 1: Using SC Command

Open Command Prompt as Administrator and try:

sc config OneSyncSvc_1e21e start= demand

For complete disablement:

sc config OneSyncSvc_1e21e start= disabled

Method 2: PowerShell Alternative

Set-Service -Name "OneSyncSvc_1e21e" -StartupType Manual

Or for atomic operations:

$service = Get-WmiObject -Class Win32_Service -Filter "Name='OneSyncSvc_1e21e'"
$service.ChangeStartMode("Manual")
$service.Change($null,$null,$null,$null,$null,$null,"NT AUTHORITY\\LocalService",$null)

Navigate to this registry path (backup first!):

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OneSyncSvc_1e21e

Modify these values carefully:

  • Start: 3 for Manual, 4 for Disabled
  • DelayedAutoStart: 0 to remove delayed start

Force removal via registry (risky):

sc delete OneSyncSvc_1e21e

Warning: This may break Microsoft Store apps and mail synchronization.

Here's a complete PowerShell script that handles edge cases:

$serviceName = "OneSyncSvc_1e21e"
try {
    $service = Get-Service -Name $serviceName -ErrorAction Stop
    
    # Stop if running
    if ($service.Status -eq 'Running') {
        Stop-Service -Name $serviceName -Force
    }

    # Modify through WMI for maximum compatibility
    $wmiService = Get-WmiObject -Class Win32_Service -Filter "Name='$serviceName'"
    if ($wmiService) {
        $result = $wmiService.ChangeStartMode("Manual")
        if ($result.ReturnValue -ne 0) {
            Write-Warning "Failed to change startup type (Error $($result.ReturnValue))"
            # Alternative approach
            sc.exe config $serviceName start= demand | Out-Null
        }
    }
    
    # Verify changes
    $updatedService = Get-Service -Name $serviceName
    Write-Host "Service $serviceName is now set to: $($updatedService.StartType)"
}
catch {
    Write-Error "Operation failed: $_"
    # Check for virtualization
    if ($_.Exception.Message -match "does not exist") {
        Write-Warning "This might be a virtualized instance. Try finding the base service name."
    }
}