You try to print, add a printer, or open Printers & scanners, and Windows gives you one of these:
Operation could not be completed (error 0x000006ba).
The RPC server is unavailable.
Sometimes the message is more specific, such as “the local print spooler service is not running”. Sometimes the Print Spooler service starts and then stops again a few seconds later, and you have to start it by hand each time. The code 0x6ba is Windows saying “I tried to talk to the RPC server and nobody answered”. RPC (Remote Procedure Call) is how Windows programs ask services to do things, and the print system uses it all the time. What you need to find out is which thing did not answer.
Applies to: Windows 10, Windows 11 and Windows Server, for local printers and for printers shared by another computer. The commands run in an elevated PowerShell window (right-click, Run as administrator).
What is going on
0x6ba is the Windows error RPC_S_SERVER_UNAVAILABLE. It does not mean the printer is broken, and by itself it does not say why. The usual causes are:
- The Print Spooler service is stopped, disabled or has crashed. The spooler is the Windows service (
spoolsv.exe) that receives, queues and sends print jobs. With it down, anything calling the print system gets 0x6ba. This is the most common case on a single PC. - A bad print job or third-party driver is crashing the spooler. Microsoft lists corrupted files in the spool folder and third-party drivers and print components as causes of spooler crashes and of “spooler subsystem app has encountered a problem” errors. If the bad job is still in the queue, the spooler can crash again every time it starts.
- Group Policy has disabled the spooler. Some organisations turn it off on purpose as a security measure, for example on domain controllers.
- Your PC cannot reach the RPC service on a remote print server. A firewall blocking the RPC ports, a wrong or unresolvable server name, or the spooler being down on the server all give the same error on your PC.
- Antivirus interfering with the spooler or the files in its folder.
Many guides for this error tell you to change RPC settings or DCOM permissions. For a stopped spooler on one PC that does not help: the RPC error is only the symptom of the spooler not running to answer the call.
Diagnosis
1. Is the Print Spooler service running?
Get-Service Spooler | Select-Object Status, StartType
Get-Service RpcSs | Select-Object Status, StartType
The result tells you which road to take:
- Status Stopped, StartType Disabled: something turned it off. Check Group Policy before you turn it back on (step 5).
- Status Stopped, StartType Automatic: it is crashing. Go to steps 2 and 3.
- Status Running: the local spooler is up. If you only get the error when connecting to a shared printer on another computer, jump to step 4.
By default the Print Spooler depends on one service only, Remote Procedure Call (RpcSs), and that must be running. Microsoft says that if the spooler lists any other dependency, you should remove it from the DependOnService value under HKLM\SYSTEM\CurrentControlSet\Services\Spooler so only RpcSs remains. That is a registry edit, so only do it if you find extra entries there, and export the key first.
2. Look at the event logs
Open Event Viewer, or use PowerShell. Start with the System log for the service stopping, then the Application log for crashes of spoolsv.exe. A crash entry names the faulting module, which is often the file of a printer driver or other print component. That is your lead.
# Spooler service stop/start events from the last 24 hours
Get-WinEvent -FilterHashtable @{LogName='System'; ProviderName='Service Control Manager'; StartTime=(Get-Date).AddDays(-1)} |
Where-Object { $_.Message -like '*Print Spooler*' } |
Select-Object TimeCreated, Id, Message | Format-List
# Crashes of the spooler process, with the faulting module in the message
Get-WinEvent -FilterHashtable @{LogName='Application'; ProviderName='Application Error'; StartTime=(Get-Date).AddDays(-7)} |
Where-Object { $_.Message -like '*spoolsv.exe*' } |
Select-Object TimeCreated, Message | Format-List
# Print service errors (driver and plug-in load failures show up here)
Get-WinEvent -LogName 'Microsoft-Windows-PrintService/Admin' -MaxEvents 30 -ErrorAction SilentlyContinue |
Select-Object TimeCreated, Id, LevelDisplayName, Message | Format-List
3. Look in the spool folder
When printing works, the files in the spool folder disappear as jobs are printed. Old files that stay behind (extensions .SPL and .SHD) are print jobs, and a damaged one can make the spooler fall over. The default folder is %SystemRoot%\System32\spool\PRINTERS. If it is empty or does not look right, check where your spool folder really is:
Get-ChildItem "$env:SystemRoot\System32\spool\PRINTERS" -Force
(Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Print\Printers").DefaultSpoolDirectory
If the second command prints a different path, use that folder instead. If it prints nothing, the default is in use.
4. If it only happens with a printer on another computer
Can you print to a local printer or save a test page to a “Microsoft Print to PDF” queue? If yes, your own spooler is fine and the problem is between you and the print server. From the PC that shows the error, check that the name resolves and that the RPC endpoint mapper answers (it listens on TCP 135, and RPC then uses dynamic ports from 49152 to 65535):
Resolve-DnsName printserver01
Test-NetConnection -ComputerName printserver01 -Port 135
Test-NetConnection -ComputerName printserver01 -Port 445
Replace printserver01 with the name in the printer path. Port 445 is SMB (file and printer sharing). Microsoft’s general 0x6ba article (written for domain joins, but the RPC part applies) lists TCP 135, TCP 445 and the dynamic range as ports a firewall must not block. If the checks fail, fix name resolution (wrong or stale DNS entry, wrong server name) or the firewall between the two machines. If they pass, log on to the print server and run steps 1 to 3 there, because a stopped or crashing spooler on the server looks identical from the client.
5. If the service is disabled
Disabling the spooler is a recognised security hardening step, and Microsoft warns that a Group Policy Object (GPO) may be doing it, including on whole domain controller OUs. Run gpresult /r or ask the person who manages Group Policy before you re-enable it. If nobody did it on purpose, set it back:
Set-Service -Name Spooler -StartupType Automatic
Start-Service -Name Spooler
Root cause
For the crash-loop version of this problem, the cause is a damaged print job or a faulty third-party driver or print component that makes spoolsv.exe fail. Windows restarts or you restart it, it picks up the same job or loads the same driver, and fails again. The 0x6ba errors your programs show are just them finding the spooler gone. For the remote version the cause is the network path, name resolution or the server’s own spooler. Work out which you have before changing anything.
The fix
Step 1: Restart the spooler
Microsoft’s first step for a stuck queue is simply a restart, which also clears queues that are only stalled:
Restart-Service -Name Spooler
If the command hangs because the service is stuck stopping, restart the PC. I have left out forcing the process to end with taskkill: it is not needed in most cases and the restart is safer.
Step 2: Clear the spool folder
This discards every queued print job on this computer, for every printer. Anyone waiting for a document will have to print it again. Check the folder from Diagnosis step 3 first so you delete the right one, and never run a wildcard delete such as del /S from the wrong directory. Delete only files inside the spool folder, and do not delete the folder itself.
The simplest way is the site’s tested script, which asks you to confirm and can show you what it would do first with -WhatIf: Clear a stuck print queue by resetting the spooler (PowerShell). It stops the spooler, deletes the spool files, and always starts the service again, even if something fails along the way.
To do it by hand, as Microsoft describes it: stop the Print Spooler service, delete all the files in the spool folder, and start the service again with its startup type set to Automatic. If you would rather keep the files for a moment to see which job was bad, move them out instead of deleting them:
Stop-Service -Name Spooler -Force
New-Item -ItemType Directory -Path "$env:USERPROFILE\spool-backup" -Force | Out-Null
Move-Item -Path "$env:SystemRoot\System32\spool\PRINTERS\*" -Destination "$env:USERPROFILE\spool-backup\"
Start-Service -Name Spooler
The moved files cannot be re-printed from there. Delete the backup folder when you are sure the problem is gone.
Step 3: If the spooler crashes again, remove the driver
If the spooler still stops after a clean spool folder, a driver or print component is the culprit. Use the module named in the Application log, or think about what changed recently: a new printer, an updated driver, a new scanning or label-printing app. List the installed drivers:
Get-PrinterDriver | Select-Object Name, Manufacturer, PrinterEnvironment
Microsoft’s advice is to update third-party drivers to the latest version from the manufacturer and, if that does not help, to test with the Windows in-box driver instead. To remove a driver, first delete the printer queues that use it (Printers & scanners, select the printer, Remove), then remove the driver. Preview it first:
Remove-PrinterDriver -Name "<driver name>" -WhatIf
Remove-PrinterDriver -Name "<driver name>"
The second command is the one that makes the change, and it needs administrator rights. On Windows Server, or Windows with the remote administration tools installed, you can also do this in the Print Management console (printmanagement.msc) under the drivers list. Remove one suspect driver at a time and test in between, so you know which one it was. Then reinstall the latest driver from the manufacturer’s website, or use the Windows in-box driver.
Step 4: Other things Microsoft lists
- Antivirus: make sure it is not blocking or scanning the spool folder and the
.SPL,.SHDand.TMPfiles in it. Microsoft recommends adding exclusions for them. - Resources and stability: if the spooler fails to start at all, look for low memory, disk full or other system trouble in the event logs.
- Enable advanced printing features: clearing this option on the printer’s Advanced tab is one of Microsoft’s troubleshooting steps for failed jobs.
Do not start changing RPC ports or DCOM permissions in dcomcnfg on a PC where the spooler is simply not running. It will not help, and incorrect DCOM changes cause new problems.
Verification
Get-Service Spooler | Select-Object Status, StartType
Get-ChildItem "$env:SystemRoot\System32\spool\PRINTERS" -Force
The service should be Running with StartType Automatic, and it should still be running a few minutes later. Open Printers & scanners: your printers should be listed without errors. Print a test page (printer properties, Print Test Page). After printing, the spool folder should be empty again. Finally check the Application log: there should be no new spoolsv.exe crash entries.
Notes
- Remote print servers and Point and Print. Since the printing security changes of 2021 (the “PrintNightmare” vulnerabilities), Windows by default only lets administrators install print drivers, including when a client connects to a shared printer and downloads its driver. Microsoft documents this as the Point and Print restriction, controlled by the policy Limits print driver installation to Administrators (
RestrictDriverInstallationToAdministrators). If a client cannot get a driver from a print server, you may see events such as 808 or 215 inMicrosoft-Windows-PrintService/Admin. That is a different failure from 0x6ba, so do not assume it is your problem. If it is, Microsoft’s documented route is the Point and Print Restrictions policy, where you can name the print servers you trust, rather than switching the protection off. Disabling the restriction removes a security protection that was added for a reason. - The spooler is also a frequent target for attackers. If you do not need printing on a server, especially a domain controller, disabling the spooler is a common hardening step. Just make sure that is the decision you really made before you re-enable it.
- The research note this article was built from also said bad EMF or PostScript jobs are the typical cause. That is plausible and matches Microsoft’s advice about corrupted spool files, but Microsoft does not name EMF specifically, so I have not relied on it.
- Cannot find the culprit after removing drivers? Microsoft’s print troubleshooting also suggests testing with a different queue and driver for the same device, and, for deep investigation, collecting a trace with its TSS tool before contacting support.
Spooler still crashing and you cannot see why? Post the faulting module from the Application log and the output of Get-PrinterDriver in The Patch Panel and we will work through it. The best answer earns points on Top of the Stack.