What's happening
Windows gives you ERROR_CLUSTER_INVALID_NODE (0X000013AF) when you try to add or use a node in a failover cluster, but the cluster doesn't recognize that node. The node is either not joined, or the cluster database has a stale entry. This error shows up during cluster creation, node addition, or when a node try to come back after a reboot.
I've seen this on Windows Server 2016 and 2019, usually after someone force-removed a node or the node lost its cluster membership during a network hiccup. The cluster thinks the node is still there but invalid, so it refuses to work with it.
Fix 1: Quick check (30 seconds)
First, make sure the node actually is part of the cluster. Open PowerShell as admin and run:
Get-ClusterNode
If the node isn't listed, then it's not in the cluster at all. That means you need to add it fresh. If it's listed but shows a status like "Down" or "Not Joined", then it's in the cluster but not communicating.
Also check that the Cluster service is running on the node:
Get-Service ClusSvc
If the service is stopped, start it:
Start-Service ClusSvc
If that doesn't fix it, move to the next step.
Fix 2: Validate the cluster (5 minutes)
Sometimes the cluster configuration is just out of sync. Run a validation on the cluster to see if there are deeper issues. From any node, open PowerShell as admin:
Test-Cluster
This takes a few minutes, but it tells you exactly what's broken. Look for errors related to network or node connectivity. If the validation fails on "Cluster Configuration" or "Cluster Service", you're in the right place.
Another thing to check: the node might have a duplicate or stale entry in AD. Force the cluster to update its database by running:
Get-ClusterNode | Update-ClusterNetworkProfile
If validation passes and the error still appears, go to the advanced fix.
Fix 3: Evict and re-add the node (15+ minutes)
This is the nuclear option, but it's the most reliable. You're going to remove the node from the cluster completely, then add it back. This clears any invalid state in the cluster database.
Step 1: Evict the node from a working node
From another node in the cluster, run:
Remove-ClusterNode -Name "YourNodeName" -Force
Replace YourNodeName with the actual node name. The -Force flag skips any prompts.
Step 2: Clean up the node's cluster settings
On the problematic node itself, open PowerShell as admin and run:
Clear-ClusterNode -Force
This removes all cluster-related configuration from the node. If this command fails, you can manually delete the cluster registry hive:
Remove-Item -Path HKLM:\Cluster -Recurse -Force
Then restart the node.
Step 3: Re-add the node
After the node restarts, add it back to the cluster. From the other node, run:
Add-ClusterNode -Name "YourNodeName"
Sometimes you need to specify the cluster name if you're not on the cluster's primary node:
Add-ClusterNode -Cluster "ClusterName" -Name "YourNodeName"
That's it. After re-adding, the node should show as "Up" and the error should be gone.
Why this works
The root cause is that the cluster database has a record for the node, but the node's own state doesn't match. Evicting removes that record, clearing the node resets its local state, and adding it back creates a fresh, valid entry. It's like turning the whole relationship off and on again, but at the database level.
Note: If you're using storage spaces direct or have CSV volumes on that node, make sure they're drained before evicting. Otherwise you might hit downtime.