Long logon time when you use the AddPrinterConnection VBScript command to map printers for users during logon process in Windows

Applies to: Windows Server 2012 R2 DatacenterWindows Server 2012 R2 StandardWindows Server 2012 R2 Essentials More

Symptoms


Consider the following scenario:
  • You have a Windows Server 2012 R2, Windows Server 2012, or Windows Server 2008 R2 Service Pack 1 (SP1)-based terminal server.
  • The terminal server is configured to use the AddPrinterConnection VBScript command to map printers for users during the logon process.
  • You try to log on to the terminal server.
In this scenario, it takes longer than expected to log on to the terminal server. Additionally, the terminal server experiences high CPU usage.

Notes
  • When this issue occurs, the terminal server is unresponsive until the printers are mapped.
  • The expected logon time is within one minute.

Cause


This issue occurs because the following operations are performed redundantly after the AddPrinterConnection VBScript command is called to create network printer mappings during the logon process:
  • Redundant registry keys are populated.
  • A printer driver is downloaded and reinstalled every time that a printer connection is added. This occurs even though the driver exists on the terminal server.

Resolution


To resolve this issue, we have released a hotfix for Windows Server 2008 R2 and Windows Server 2012, and we have released an update rollup for Windows Server 2012 R2 and Windows Server 2012.

Get the update rollup for Windows Server 2012 R2 and Windows Server 2012

To resolve this issue, install the May 2014 update rollup for Windows RT 8.1, Windows 8.1, or Windows Server 2012 R2.

To resolve this issue, install the December 2014 update rollup for Windows RT, Windows 8, and Windows Server 2012.

Get the hotfix for Windows Server 2012 and Windows Server 2008 R2

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft website: Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

To apply this hotfix, you must install Service Pack 1 for Windows Server 2008 R2.

Registry information

To apply this hotfix, you do not have to make any changes to the registry.

Restart requirement

You must restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace a previously released hotfix.

More Information


Status


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

References


See the terminology that Microsoft uses to describe software updates.