Run the Windows 11 Printer troubleshooter first, then inspect each virtual printer’s assigned port and rebuild only the queue that produces the port-in-use error.
1. Run the recommended diagnostic
- Open Start, search for Get Help, and open it.
- Search for printer troubleshooter and run the automated diagnostic.
- Apply any offered repair, then test Microsoft XPS Document Writer and Microsoft Print to PDF separately.
Microsoft recommends this as the initial Windows 11 printer diagnostic.^1^
2. Identify which queue and port conflict
“Printer 11B” appears to identify the printer or queue, but the relevant value is on the Ports tab:
- Open Control Panel and select Devices and Printers.
- Right-click Microsoft XPS Document Writer → Printer properties → Ports.
- Record the checked port.
- Repeat for Microsoft Print to PDF.
- Test each queue and note which one produces the error.
Do not remove both virtual printers unless both independently fail.
3. If XPS Document Writer is affected
First repair the Windows feature:
- Open Settings → System → Optional features.
- Under Related settings, select More Windows features.
- Clear Microsoft XPS Document Writer, select OK, and restart.
- Return to the same location, enable it again, and restart if requested.^2^
If the XPS queue is still missing or still conflicts:
- Open Settings → Bluetooth & devices → Printers & scanners.
- Select Add device, wait for the search, then choose Add manually.
- Select Add a local printer or network printer with manual settings.
- Select Use an existing port, then choose PORTPROMPT: (Local Port).
- Choose Microsoft as the manufacturer and Microsoft XPS Document Writer v4 as the printer.
- Complete the wizard and print a test XPS file.^3^
Administrator approval might be required to change Windows features or install the queue.
4. If Microsoft Print to PDF is affected
- Open Settings → Bluetooth & devices → Printers & scanners.
- Select only Microsoft Print to PDF, then select Remove.
- Open Turn Windows features on or off.
- Clear Microsoft Print to PDF, select OK, and restart.
- Reopen Windows Features, enable Microsoft Print to PDF, and restart again.^4^
- Return to Printer properties → Ports and verify which port Windows assigned; do not try to create another port with the same name.
- Print a test document to PDF.
Toggling the feature may recreate the queue, so verify the resulting queue and port rather than assuming the port was replaced.
Protected print mode check
If XPS disappears again, search Settings for Windows protected print mode. That mode removes XPS when enabled; XPS can be reinstalled after protected print mode is disabled.^5^
Security warning: Disabling protected print mode reduces printing protection and permits printer configurations that the mode excludes. Leave it enabled unless XPS output is required; using XPS means choosing to disable that protection.
If stale print state remains
Resetting the spooler clears pending jobs and temporary spooler state, but it might not remove a persistent duplicate port definition:
- Press Windows+R, enter
services.msc, and press Enter. - Double-click Print Spooler, select Stop, then OK.
- Open
%WINDIR%\system32\spool\PRINTERS. - Delete the files inside that folder—this permanently removes all pending print jobs.
- Return to Services, open Print Spooler, set Startup type to Automatic, and select Start.^1^
Administrator approval might be required. If the duplicate-port error remains afterward, avoid manually deleting registry port entries; provide the exact checked port names and full error text for targeted removal of the stale port registration.
References