0X800F0222

Fix SPAPI_E_MACHINE_UNAVAILABLE (0x800F0222) on Windows

0x800F0222 means Windows can't reach the machine it's trying to talk to. Usually a broken RPC service, a remote registry block, or a stale device install.

You're staring at SPAPI_E_MACHINE_UNAVAILABLE (0x800F0222) and Windows is being spectacularly unhelpful about which machine, or why, or since when.

Here's the fix that works in about 90% of cases, especially the ones that hit right after a Windows feature update.

The fix: restart the RPC stack and clear the stuck device install

Open an elevated Command Prompt or PowerShell. Run these in order, one at a time, and read the output. Don't paste them as a batch — the order matters because each step depends on the previous service actually being up.

net stop umbus
net stop deviceinstall
net stop deviceassociation
net stop devicestore
net stop rpcss

sc config rpcss start= auto
sc config rpcss depend= /
net start rpcss
net start devicestore
net start deviceassociation
net start deviceinstall

Two things to notice. First, sc config rpcss depend= / clears the dependency list on the Remote Procedure Call service. That dependency list gets corrupted more often than anyone admits, and when it is, RPC starts but never finishes registering its endpoints — which is exactly what produces 0x800F0222. Second, we set it to auto, not Automatic (Delayed Start). Delayed start is a footgun for RPC. The endpoint mapper needs to be ready before anything calls it.

Reboot. Then retry whatever triggered the error — usually Device Manager's "Add legacy hardware", a remote driver install via pnputil, or Windows Setup itself.

If that didn't do it, the block is almost certainly the firewall or a group policy. Check the Remote Registry service and RPC inbound rules:

sc query RemoteRegistry
netsh advfirewall firewall show rule name=all | findstr /i "RPC"

RemoteRegistry should be RUNNING if you're installing drivers to a remote machine. If it's stopped and set to Disabled, start it and set it to Manual (not Automatic — leaving it on permanently is a security problem). For the firewall, the rule group "Remote Service Management" and "Remote Event Log Management" both need to be allowed on the target machine, and on the source if you're using a management console.

Why this actually works

SPAPI_E_MACHINE_UNAVAILABLE is a SetupAPI error. "SPAPI" is Setup API. The error string — "the machine selected for remote communication is not available at this time" — is literal: SetupAPI tried to open an RPC binding to a target (local or remote), and the endpoint mapper on that target didn't hand back a valid endpoint. That's not a network problem in the usual sense. Pinging the machine works. SMB works. Only the SPAPI path fails.

The reason step 3 above works is the RPC endpoint mapper (port 135, and the dynamic range 49152–65535 on modern Windows) has to be reachable and responsive. If rpcss has a broken dependency chain, the service reports as running in sc query but never opens its listener. Nothing on the box can bind. SetupAPI gives up and reports the machine as unavailable, even when it's sitting right there.

If you've ever seen this error on a machine that was local, not remote — that's why. The local machine is still a "remote communication" target from SetupAPI's point of view. It talks over RPC to itself.

Less common variations

1. Domain-joined machines with restrictive Group Policy

If you're on a corporate box, check gpedit.msc under Computer Configuration → Administrative Templates → System → Remote Procedure Call. The "RPC Endpoint Mapper Client Authentication" policy, when enabled, forces mutual authentication and blocks unauthenticated RPC calls. SetupAPI's internal calls are often unauthenticated. The error shows up only when you try to install hardware or update drivers remotely. You'll need your domain admin to relax the policy for the OU, or run the install from a machine outside that OU.

2. Windows Server Core or headless installs

Server Core doesn't ship the full Device Manager. If you're running pnputil /add-driver against a remote Server Core box, the error often means the Device Install Service (deviceinstall) is disabled. It's disabled by default on some Server SKUs to save resources. Run sc config deviceinstall start= demand and start it.

3. IPv6-only environments

SetupAPI's default binding tries IPv4 first on some builds. On an IPv6-only network, the bind times out and you get 0x800F0222 instead of a clean IPv6 fallback. The workaround is to add an IPv4 loopback alias on the target or use the machine's IPv6 literal in UNC form (\\[fe80::1%12]\admin$). Ugly, but it works.

4. Third-party security products

Endpoint agents from several large vendors hook the RPC layer to inspect incoming calls. When their filter driver crashes or updates mid-session, they stop passing RPC traffic and you get exactly this error. Check fltmc filters for anything obviously third-party, and check the vendor's event log source (not the Windows Application log — their own log). A temporary uninstall confirms it in about five minutes.

Preventing it from coming back

  • After every Windows feature update, verify rpcss has no dependencies: sc qc rpcss. The dependency list should be empty.
  • Leave RemoteRegistry set to Manual, not Automatic. If something needs it, the caller will start it.
  • Don't disable the four device services (umbus, deviceinstall, deviceassociation, devicestore) even on "stripped" or "gaming" Windows builds. Every one of those tweak guides leaves them off, and this error is the most common result.
  • On domain machines, test driver deployment from a non-managed jump box if your OU has aggressive RPC authentication policy.
  • If you're scripting pnputil against remote hosts, wrap it with a quick RPC liveness check first so you fail fast with a readable message instead of 0x800F0222.

One more thing worth knowing: this error code is also returned by WUSA and the Windows Update standalone installer when they can't reach a WSUS or Configuration Manager endpoint. If you're running a .msu file manually and see 0x800F0222, the problem isn't the .msu — it's the machine's RPC stack or a policy blocking the WU service from reaching its management point. Same fix, same root cause, different entry point.

Related Errors in Windows Errors
0XC00D0BCF Fix NS_E_NO_MORE_SAMPLES (0xC00D0BCF) – No More Samples in Range 0X0000023D Fix 0x23D Missing System File Error on Windows 10/11 0XC0368002 IPsec DoS Protection Invalid Packet Error Fix (0xC0368002) 0X800F0246 Fix SPAPI_E_DEVICE_INSTALLER_NOT_READY (0x800F0246) on Windows

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.