Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / Fix: Windows Cannot Connect to the Shared Printer

April 19, 2023 Windows 10Windows 7Windows Server 2019

Fix: Windows Cannot Connect to the Shared Printer

In this article, we provide solutions to common Windows errors (0x0000011b and 0x00000002) that can occur when connecting a shared network printer from a remote computer (print server). Find the error that appears when connecting a printer in the list below and proceed to the fix.

Contents:
  • 0x00000002 – Printer Connectivity Error
  • Error 0x0000011b: Windows Cannot Connect to the Printer

0x00000002 – Printer Connectivity Error

Error 0x00000002 can occur when trying to connect a shared network printer (from the Print Server or the local TCP/IP port) in both Windows 10 and Windows 7. After you have opened the list of shared printers on a remote computer (via UNC path \\computername), and clicked the Connect button, an error appears

Connect to Printer

Windows cannot connect to the printer.

Operation failed with error 0x00000002.

Windows cannot connect to the printer. Operation failed with error 0x00000002

The error 0x00000002 means that the driver of this printer installed on the computer is corrupted. First of all, you should try to remove this driver from the driver store (if you get an error 0x00000057).

Run this command:

printui.exe /s /t2

In the list of installed drivers, find the printer driver you want to reinstall and remove it by clicking Remove and select the Remove driver and driver package option.

Remove printer driver and driver package

You can also use the PowerShell to uninstall the printer driver:

Remove-PrinterDriver -Name "HP Universal Printing PCL 5"

Or use the built-in prnmngr.vbs script to manage printers from cmd:

cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -d -m "HP Universal Printing PCL 5" -e "Windows x64" -v 3

Restart the spooler (net stop spooler & net start spooler) and try to connect your printer again.

It is likely that the driver will be installed and the printer will connect successfully.

Otherwise, try the following:

  1. Remove this registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations;
  2. If there are any subfolders with the names from 1 to 499 in c:\Windows\System32\spool\prtprocs\x64, delete all of them except winprint.dll;
  3. Delete all Print Processors and drivers (except winprint) from the reg key HKLM\SYSTEM\CurrentControlSet\Control\Print\Environments;
  4. Restart your computer and connect to the shared printer.

As a workaround, if the previous methods haven’t helped, connect your printer via UNC path following the instructions in the article How to Print on Windows 10 Network Printer from XP.

Error 0x0000011b: Windows Cannot Connect to the Printer

The mass issue with connecting shared network printers with error 0x0000011b started after installing Windows security updates from September 15, 2021.

When connecting a shared printer from a remote computer an error appears:

Connect to Printer
Windows cannot connect to the printer.
Operation failed with error 0x0000011b.

Windows cannot connect to the printer. Operation failed with error 0x0000011b.

This issue is related to the latest security updates in which Microsoft is trying to close the Print Nightmare vulnerability. Unfortunately, the updates are not fully tested and cause massive errors 0x0000011b.

To solve the problem, you need to remove the last security update on the computer where the printer is shared (!). Depending on the version and build of Windows on the computer sharing the printer, you need to uninstall one of the following updates:

  • KB5005565 — Windows 10 2004. 20H2 and 21H1
  • KB5005566 – Windows 10 1909
  • KB5005568 – Windows 10 1809 and Windows 10 LTSC
  • KB5005030 — Windows Server 2019
  • KB5005573 – Windows Server 2016
  • KB5005613, KB5005627 — Windows Server 2012 R2, Windows 8.1
  • KB5005563 – Windows 7, Windows Server 2008 R2 (who has an Extended Security Updates subscription for Windows 7 and Serve 2008 R2)

KB5005565 windows 10 update connecting shared printer issue

To remove an update, go to Start -> Settings -> Update & Security -> View Update History -> Uninstall updates. Select the recently installed update based on your version/build of Windows (for example, Security Update for Microsoft Windows (KB5005565)) and click Uninstall.
Or use the wusa command (specify the update number for your Windows build):

wusa.exe /uninstall /kb:5005565

Learn more about the main ways to uninstall updates in Windows.

Restart your computer and try to connect your network printer manually or using Group Policy. Note that if users cannot connect network printers without local administrator permissions (due to the PrintNightmare vulnerability fix), you can temporarily allow non-admin users to install printers by running the command:

reg add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\Printers\PointAndPrint" /v RestrictDriverInstallationToAdministrators /t REG_DWORD /d 0 /f

Then the user will be able to connect the shared printer and you must set the value to RestrictDriverInstallationToAdministrators = 1.

After uninstalling the update, you need to hide it from the installation. In this case, it won’t be automatically installed on the next Windows Update scan cycle.

You can hide updates with the official tool wushowhide.diagcab or using the PowerShell PSWindowsUpdate module:

$HideList = "KB5005565", "KB5005566", "KB5005568"
Hide-WindowsUpdate -KBArticleID $HideList -Verbose

If you are deploying updates from a local WSUS server, you should decline their installation.

If you are unable to uninstall the update, as a workaround, you can connect a network printer through the local port. For example, the local port name for connecting a printer from a remote computer might look like this: \\pcname123\HP1220

Connecting a printer via a local port is described in the article about another common error connecting a network printer – 0x0000007e.

Another workaround is to set the reg key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print\RpcAuthnLevelPrivacyEnabled to 0.

37 comments
4
Facebook Twitter Google + Pinterest
previous post
Change User Password in an RDP Session on Windows
next post
Internet Connection Sharing (ICS) Stops Working After Reboot in Windows 10

Related Reading

How to Connect VPN Before Windows Logon

November 14, 2023

Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

November 7, 2023

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

How to Use Ansible to Manage Windows Machines

September 25, 2023

37 comments

motaleb April 7, 2019 - 10:36 am

thanks it’s done

Reply
Vipin January 15, 2020 - 11:22 am

thanks a lot
done

Reply
Aviad March 9, 2020 - 1:52 pm

is this command removes the driver from the localhost or from the print server?

Reply
admin April 2, 2020 - 10:48 am

This command is applied on your computer (localhost).

Reply
Bogdan December 3, 2020 - 8:09 am

Simple and efective. Job done

Reply
Eduardo March 3, 2021 - 5:18 pm

Thanks!! Finally!

Reply
Mike September 17, 2021 - 12:08 pm

Similar issue in Active Directory domain
Print server windows 2016 Core, Windows 10 clients
Printers can’t be connected, set as default or installed on client computers
Removing KB5005573 from print server solved the 0x0000011b problem.

Reply
nikki September 17, 2021 - 12:13 pm

I have a shared printer on Win 10 PC and Win 10 laptop. All was fine until I installed this latest Windows update on PC.
Then I try to print a test page it gives me a 0x0000011b error on laptop. Printing from the local desktop works fine.

Reply
0quang0 September 17, 2021 - 12:17 pm

I same error on Win 10, then Uninstall KB5005565, it’s ok now

Reply
TheRussell September 17, 2021 - 1:26 pm

If you deploy printers via GPO to the computers rather than the user, it works as the computer policy installs the print driver with SYSTEM permissions.

Reply
LT September 17, 2021 - 2:04 pm

There are three updates released recently KB5005565, KB5005613, KB5005627, and KB5005563. They are addressed to correct an exploit vulnerability in printer driver injection (called PrintNightmare)

Reply
Yeo September 21, 2021 - 3:55 am

Thank you very much, my problem (Error 0x0000011b) solved.

Reply
Munna Singh September 21, 2021 - 9:38 am

I have a shared printer on Win 10 PC and Win 10 laptop. All was fine until I installed this latest Windows update on PC.
Then I try to print a test page it gives me a 0x0000011b error on the laptop. Printing from the local desktop works fine.

Reply
Mike September 24, 2021 - 12:41 pm

You can add the following registry parameter on the print server in order not to remove the latest security updates:

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print]
“RpcAuthnLevelPrivacyEnabled”=dword:00000000

Reply
Arun September 29, 2021 - 3:20 am

Do we need to reboot the print server after adding the following regkey on it?

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print]
“RpcAuthnLevelPrivacyEnabled”=dword:00000000

Reply
Mike September 29, 2021 - 12:17 pm

most likely yes

Reply
Ariel October 5, 2021 - 3:47 pm

Thank you so much for all your great tutorials learning a lot

Reply
Romeo October 14, 2021 - 6:11 pm

KB5006670 caused the same issue— uninstalled and it worked like charm.. thanks for sharing this valuable info.

Reply
VARINDER SURI October 15, 2021 - 12:52 pm

Thanks Romeo It worked for Me Also.

Reply
Reggie Hayes October 22, 2021 - 1:36 pm

Have a Print Server with 2016 and it has the latest patches as of today and don’t see the patches mentioned above to be removed. Have they removed them and replaced with newer patches causing the same problems such as requesting Admin credentials?

Reply
admin October 26, 2021 - 11:04 am

Microsoft has added these changes in the next security update.
You will have to either uninstall the updates, or permanently enable the registry setting parameter RestrictDriverInstallationToAdministrators = 0
reg add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\Printers\PointAndPrint" /v RestrictDriverInstallationToAdministrators /t REG_DWORD /d 0 /f
So far, only these two workarounds are known.

Reply
Dave October 25, 2021 - 8:52 am

Hi – I a so pleased to have found this thread – thought I was going mad! I have a similar problem though a different Error number.
Setup is Win 7 Ultimate on a PC usb connection to Printer (Aged Brother DCP135C)
This works well. I also have a laptop with Win 10 (Enterprise N) This connects via wifi to the PC and after a few problems initially has been ok. Have had full access to files between the PC and laptop ( both ways) (This still works)
Since the recent Win 10 update I have been unable to send a print instruction from the laptop even though it can see the printer and appears to be connected.
The Printer troubleshooter finds no problems!!
When I try to print a test page however I get :
“Operation could not be completed (error 0x0000003a). The specified server cannot perform the requested operation.”

Trying to print from notepad or a pdf produces a similar message. This particular error number is not mentioned in this thread and am wondering if the fixes mentioned would work. I am not used to doing registry edits so dont want to mess it up even more.
Have tried restarting both machines and running sfc scannow on both. Am I correct in assuming I would make any changes on the laptop running Win 10

Reply
admin October 26, 2021 - 10:56 am

That’s right, you need to make changes on your Windows 10 host

Reply
Dave October 27, 2021 - 9:44 am

Thanks- decided against making any changes and just uninstalled update KB5006670.
Printer now working again. Just need to stop it re installing it again LOL

Reply
cashxx October 28, 2021 - 12:10 am

Getting this error here:
windows cannot connect to the printer 0x000006e4

Reply
Dave October 31, 2021 - 10:36 am

Have you tried anything to fix it? – are you using win10? if so is it just since the 6670 update? and if it is
have you tried uniinstallling the update?

Reply
cashxx November 1, 2021 - 12:25 pm

Yea, uninstalled everything on the server end. Still working on client. So far no luck.

Reply
shanoj October 31, 2021 - 5:04 am

i can’t print now from shared printer. when i try to print print getting hang, keep on rounding. is it because of update installation . pls help me

Reply
Dave October 31, 2021 - 10:43 am

As my reply above + do you just have 1 printer shared with 2 PCs – does it print from the other one?

Reply
SHANOJ KIZHEPAT November 1, 2021 - 8:46 am

NO, ITS NOT PRINTING FROM ANY PCY WHEN TRY TO PRINT ITS GET HANG

Reply
Dave November 1, 2021 - 11:17 am

Is this a home setup or business- Is the printer connected to one pc with USB – on that pc can you do a test print?
Tried switching the printer off and on?
If you have not already – uninstall the last win10 update. If that corrects it you then need to “hide” it so it
doesnt reload. If it doesnt correct it then the problem lies elsewhere so you can re install it.

Reply
Support November 6, 2021 - 12:57 pm

my pc is unable to connect to USB (not a network printer) shared printer.
“windows could not connect to the printer error 0x00000709”
please suggest the solution

Reply
Dave November 12, 2021 - 2:48 pm

Re Recent update
After installing this update, Windows print clients might encounter the following errors when connecting to a remote printer shared on a Windows print server:

0x000006e4 (RPC_S_CANNOT_SUPPORT)

0x0000007c (ERROR_INVALID_LEVEL)

0x00000709 (ERROR_INVALID_PRINTER_NAME)

Note The printer connection issues described in this issue are specific to print servers and are not commonly observed in devices designed for home use. Printing environments affected by this issue are more commonly found in enterprises and organizations.

For workarounds and the latest status for this issue, please see Windows release health:

OS Build 19041.1288

OS Build 19042.1288

OS Build 19043.1288

We are presently investigating and will provide an update in an upcoming release.

Reply
P.Shreenivasan December 2, 2021 - 7:22 am

printer USB share problem.

Reply
Devin Brown July 17, 2022 - 9:46 pm

For the record, setting the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print\RpcAuthnLevelPrivacyEnabled registry key to 0 on the print server and then rebooting it solved the issue for me as well. Thank you so much for your assistance.

Reply
Tom April 19, 2023 - 6:33 am

Error then connecting shared printer:
Connect to Printer
Windows cannot connect to the printer
Operation failed with error 0x00000057
This helped:
Remove printer driver:
printui.exe /s /t2
and re-install

Reply
Alex April 19, 2023 - 6:36 am

Got an error:
Connect to Printer
A policy is in effect on your computer which prevents you from connecting to this print queue. Please contact your system administrator.

Check
1) if the driver is signed with the trusted digital signature
2) if the package-aware print driver installed (non-package-aware v3 printer drivers won’t be able to be installed in Point and Print Restrictions mode)

3) Deploy the certificate of the signing publisher to client computers: Local computer > Trusted publishers > Certificates
This way the driver can be installed because the publisher is trusted when using point and print.

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • How to Connect VPN Before Windows Logon

    November 14, 2023
  • Removing Azure Arc Setup Feature on Windows Server 2022

    November 9, 2023
  • Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

    November 7, 2023
  • Send Emails with Microsoft Graph API and PowerShell

    November 6, 2023
  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Repair EFI/GPT Bootloader on Windows 10 or 11
  • How to Restore Deleted EFI System Partition in Windows
  • Network Computers are not Showing Up in Windows 10/11
  • Updating List of Trusted Root Certificates in Windows
  • How to Create a Wi-Fi Hotspot on your Windows PC
  • How to Sign an Unsigned Device Driver in Windows
  • How to Download APPX File from Microsoft Store for Offline Installation?
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top