Windows 10 WVD pnplockdownfiles bloat

%3CLINGO-SUB%20id%3D%22lingo-sub-2277694%22%20slang%3D%22en-US%22%3EWindows%2010%20WVD%20pnplockdownfiles%20bloat%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2277694%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWindows%2010%20Multi-Session%20WVD%20machine%20and%20pnplockdownfiles%20bloating%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDealing%20with%20an%20issue%20where%20the%20pnplockdownfiles%20seems%20to%20be%20bloating%20really%20badly%20with%20repeated%20printer%20driver%20installations%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHKLM%3A%5CSOFTWARE%5CMicrosoft%5CWindows%5CCurrentVersion%5CSetup%5CPnpLockdownFiles%5C%25SystemRoot%25%2Fsystem32%2Fspool%2FDRIVERS%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOn%20the%20WVD%20session%20hosts%20I%20cannot%20even%20open%20the%20PnpLockdownFiles%20key%20as%20its%20that%20large.%3C%2FP%3E%3CP%3Eand%20is%20taking%20up%20to%2020%2F30%20minutes%20for%20the%20machine%20to%20boot%20up%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPrinters%20are%20mapped%20using%20GPP%20under%20the%20user%20context.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20seems%20to%20be%20a%20fix%20for%20this%20for%20Server%202012%20R2%3A%20%3CA%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Ftopic%2Flong-logon-time-when-you-use-the-addprinterconnection-vbscript-command-to-map-printers-for-users-during-logon-process-in-windows-dd9df9a3-aa9b-1ddb-ce84-ae6df55b1e7b%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Ftopic%2Flong-logon-time-when-you-use-the-addprinterconnection-vbscript-command-to-map-printers-for-users-during-logon-process-in-windows-dd9df9a3-aa9b-1ddb-ce84-ae6df55b1e7b%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJust%20to%20add%20to%20this%2C%20as%20a%20test%20I%20have%20set%20this%20up%20on%20my%20lab%20environment.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEvery%20login%20it%20creates%20driver%20entries%20in%20the%20pnplockdownfiles%20key.%3C%2FP%3E%3CP%3ESo%20in%20this%20instance%20I%20have%20logged%20into%20the%20WVD%20machine%203%20times%2C%20using%20a%20HP%20printer%20driver%20I%20got%20from%20Windows%20update%20as%20a%20test.%26nbsp%3B%20It%20looks%20like%20it%20installs%20the%20driver%203%20times.%26nbsp%3B%20This%20will%20just%20continue%20on%20every%20logon.%20I've%20seen%20it%20with%20HP%20and%20Ricoh%20drivers.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20is%20strange%20is%20the%20location%20of%20the%20drivers%20doesn't%20even%20exist%20under%20system32%5Cspool%5CDrivers%5Cx64%2C%20the%20entries%20are%20not%20there.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20just%20a%20lab%20with%20one%20user%20and%20one%20printer.%20In%20my%20scenario%20I%20have%2012%20printers%20and%20loads%20more%20people%2C%20you%20can%20imagine%20the%20size%20of%20this%20key.%20Is%20this%20a%20bug%20within%20Windows%2010%20Multi-Session.%20Does%20it%20need%20to%20go%20to%20Microsoft%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKevin%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2279862%22%20slang%3D%22en-US%22%3ERe%3A%20Windows%2010%20WVD%20pnplockdownfiles%20bloat%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2279862%22%20slang%3D%22en-US%22%3EThanks%20for%20your%20answer%2C%20majority%20are%20HP%20and%20one%20Ricoh%2C%20will%20see%20if%20we%20can%20switch%20to%20Universal%20Drivers.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2279858%22%20slang%3D%22en-US%22%3ERe%3A%20Windows%2010%20WVD%20pnplockdownfiles%20bloat%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2279858%22%20slang%3D%22en-US%22%3EHi%2C%3CBR%20%2F%3EThanks%20for%20your%20reply.%20I'm%20just%20testing%20different%20drivers%20in%20the%20lab.%20The%20HP%20Universal%20Printer%20may%20be%20the%20answer%20as%20I've%20just%20tested%20using%20that%20with%20two%20printers%20and%20it%20doesn't%20add%20any%20entries%20to%20PnpLockdownFiles%20at%20all.%20I%20only%20have%2040%20users%20with%2012%20printers%2C%20the%20only%20difference%20is%20that%20all%20users%20have%20all%2012%20printers%20mapped%20as%20they%20move%20about.%3CBR%20%2F%3EI%20don't%20think%20I%20can%20recover%20the%20machines%20as%20its%20in%20Azure%20and%20won't%20be%20able%20to%20boot%20into%20PE%20to%20delete%20and%20compress%20the%20registry.%3CBR%20%2F%3EThis%20issue%20has%20caught%20me%20by%20surprise.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2279665%22%20slang%3D%22en-US%22%3ERe%3A%20Windows%2010%20WVD%20pnplockdownfiles%20bloat%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2279665%22%20slang%3D%22en-US%22%3E%3CP%3EYes%2C%20the%20GPO%20printer%20map%20will%20re-install%2Fverify%20the%20driver%20files%20each%20time%20a%20user%20try%20to%20login%20to%20a%20RDS%20server%20depending%20of%20the%20the%20GPO%20map%20settings%2C%20because%20it%20need%20to%20keep%20the%20settings%20in%20the%20user%20context.%20With%20a%20few%20printer%20and%20a%20few%20users%20it%20should%20not%20be%20an%20issue.%20But%20In%20the%20past%20I%20have%20seen%20large%20RDS%20envirenoment%20that%20were%20trying%20to%20load%20more%20than%20200%20printers%20on%20a%202008%20R2%20server%20and%20it%20did%20endup%20bloating%20the%20registery%20and%20it%20is%20very%20hard%20to%20cleanup.%20In%20these%20cases%20I%20would%20strongly%20suggest%20you%20to%20find%20another%20printing%20maping%20solution%20(Sometimes%20you%20need%20to%20tell%20the%20user%20that%20their%20printer%2Fprintdriver%20were%20not%20deisgned%20for%20multisession%20and%20they%20need%20to%20change%20the%20printer)%20or%20a%20third%20party%20printing%20solution%20for%20your%20environment.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2279306%22%20slang%3D%22en-US%22%3ERe%3A%20Windows%2010%20WVD%20pnplockdownfiles%20bloat%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2279306%22%20slang%3D%22en-US%22%3E%3CP%3ENot%20seeing%20this%20behavior%20in%20our%20lab%20env%20if%20redirection%20is%20forced%26nbsp%3Bto%20use%20the%20RDS%20EasyPrint%20drivers%20(which%20I'm%20currently%20able%20to%20get%20away%20with%20in%20our%20environment%20...%20you%20may%20not%20have%20that%20luxury).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20pre-installing%20the%20HP%2FRicoh%2Fother%20vendor%20universal%20print%20drivers%20on%20the%20WVD%20host%20(instead%20of%20something%20from%20Windows%20Update)%20and%20%2F%20or%20changing%20the%20%22%3CSPAN%3ESpecify%20RD%20Session%20Host%20Server%20fallback%20printer%20driver%20behavior%22%20GPO%20to%20%22do%20nothing%22%20make%20a%20difference%3F%20(not%20sure%20if%20either%20is%20an%20option%20in%20your%20environment%20...%20but%20could%20potentially%20help%20prevent%20terminal%20services%20print%20driver%20installation%20bloat)%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi,

 

Windows 10 Multi-Session WVD machine and pnplockdownfiles bloating

 

Dealing with an issue where the pnplockdownfiles seems to be bloating really badly with repeated printer driver installations:

 

HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\PnpLockdownFiles\%SystemRoot%/system32/spool/DRIVERS

 

On the WVD session hosts I cannot even open the PnpLockdownFiles key as its that large.

and is taking up to 20/30 minutes for the machine to boot up

 

Printers are mapped using GPP under the user context.

 

There seems to be a fix for this for Server 2012 R2: https://support.microsoft.com/en-us/topic/long-logon-time-when-you-use-the-addprinterconnection-vbsc...

 

Just to add to this, as a test I have set this up on my lab environment.

 

Every login it creates driver entries in the pnplockdownfiles key.

So in this instance I have logged into the WVD machine 3 times, using a HP printer driver I got from Windows update as a test.  It looks like it installs the driver 3 times.  This will just continue on every logon. I've seen it with HP and Ricoh drivers.

 

What is strange is the location of the drivers doesn't even exist under system32\spool\Drivers\x64, the entries are not there.

 

This is just a lab with one user and one printer. In my scenario I have 12 printers and loads more people, you can imagine the size of this key. Is this a bug within Windows 10 Multi-Session. Does it need to go to Microsoft?

 

Thanks.

 

Kevin

4 Replies

Not seeing this behavior in our lab env if redirection is forced to use the RDS EasyPrint drivers (which I'm currently able to get away with in our environment ... you may not have that luxury).

 

Does pre-installing the HP/Ricoh/other vendor universal print drivers on the WVD host (instead of something from Windows Update) and / or changing the "Specify RD Session Host Server fallback printer driver behavior" GPO to "do nothing" make a difference? (not sure if either is an option in your environment ... but could potentially help prevent terminal services print driver installation bloat)

Yes, the GPO printer map will re-install/verify the driver files each time a user try to login to a RDS server depending of the the GPO map settings, because it need to keep the settings in the user context. With a few printer and a few users it should not be an issue. But In the past I have seen large RDS envirenoment that were trying to load more than 200 printers on a 2008 R2 server and it did endup bloating the registery and it is very hard to cleanup. In these cases I would strongly suggest you to find another printing maping solution (Sometimes you need to tell the user that their printer/printdriver were not deisgned for multisession and they need to change the printer) or a third party printing solution for your environment.

Hi,
Thanks for your reply. I'm just testing different drivers in the lab. The HP Universal Printer may be the answer as I've just tested using that with two printers and it doesn't add any entries to PnpLockdownFiles at all. I only have 40 users with 12 printers, the only difference is that all users have all 12 printers mapped as they move about.
I don't think I can recover the machines as its in Azure and won't be able to boot into PE to delete and compress the registry.
This issue has caught me by surprise.
Thanks for your answer, majority are HP and one Ricoh, will see if we can switch to Universal Drivers.