![]() It's also not something that I think will scale super well since our subnets aren't organized enough for it, aside from smaller site locations. I also set up Location Based Printing, which does actually work nicely, but also doesn't seem to allow users to manage default printers. I feel like no matter what I do with this it's 2 steps forward, 2 steps back and I end up in the same place. except users cannot keep a default printer. So instead I used the DEM printer mappings for these devices which work great. I've tried everything I could find online for DEM on this, and the printers just disappear. I actually did go ahead and set up a print server for a new site and configured point and print to allow users to manage print devices in a limited manner, but no matter what I do, printers do not retain in user profiles. I have unfortunately stumbled into an environment with a bunch of DNS added devices and no print servers, so I need to figure something out. Unfortunately it looks like for some reason while my log off script is behaving, my log on/import script is not doing anything. (New-Object -ComObject WScript.Network).SetDefaultPrinter($printer.Name) $printer = Import-CSV "$env:localappdata\Microsoft\Windows\defaultprinter.csv" Get-WmiObject -Query " SELECT * FROM Win32_Printer" | Where-Object | Select-Object Name | Export-CSV "$env:localappdata\Microsoft\Windows\defaultprinter.csv" -NoTypeInformation Here is what was in each powershell script: Powershell.exe -ExecutionPolicy Bypass C:\ProgramData\vdiscripts\defaultprinterexport.ps1 ![]() I created a Logoff Task with the following: Powershell.exe -ExecutionPolicy Bypass C:\ProgramData\vdiscripts\defaultprinterimport.ps1 I created a Logon Task with the following: I put them into a directory that I created that hast other scripts I use - C:\ProgramData\vdiscripts\ ![]() # You can put file wherever you want to, that's just where I put it. I used Dynamic Environment Manager (formerly known as UEM) to create a config file to persist the CSV file by creating a custom config file from the Config File Creation Wizard: I am already using a simliar method with Get-Printer/Add-Printer for persisting IP mapped printers so that's why I went this way. When I googled searched I landed her and a few other pages and came up with an alternative solution. So I'm not sure if anyone is still looking but here is what I am using in our production environment and don't have any issues. OShell.RegWrite strKey, strPrinter, "REG_SZ" StrKey = "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device" Set objFile = objFSO.OpenTextFile("p:\defaultprinter.txt", 1) Set objTextFile = objFSO.CreateTextFile("p:\defaultPrinter.txt", True) Set objFSO = CreateObject("Scripting.FileSystemObject") StrValue = "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device" Set oShell = CreateObject("WScript.Shell") This is an exact copy of the script we are using to do this today across 650 vms Then upon logon you will create a scheduled task to copy that default printer info from text file back in to the registry. There is another way.if you dont want to use Client Side preferencesĮssentially you are going to create a script to write your currently saved default printer to a network drive upon logoff. You can also item level target this to a security group of users or a OU where your users are based./ Only if a local printer is not present: True/False Set the printer as a default Printer> True User Configuration:>Preferences>Control Panel Settings>Printers> Shared Printer> Then create an entry (string value): Disabled and set it to: 1īut registry editing and disabling service didn't helped. If you do not want to disable the NLA service, Do it on a per-user base in the current user registry (see below)Ĭreate a Key in HKEY_CURRENT_USER\Printers. (i believe its related to: every guest generates there own network ID, if the ID is different NLA sets the default printer to the system default (which in my case is the PDF creator) (sorry guys, this was NOT the sollution)Ģ. (for every user) disable the "Network Location Awareness" Service in the services console and include it in your gold image Its realated to the "network location awareness" serviceġ. This happens on win8 or win10, it doesn't matter. Vm pool is Automated Desktop Pool with source vCenter (linked clone). Every time user loggs in into VDI his default printer is not the printer which it made default in previous login. We have vmware vSphere6 and VDI desktop infrastructure.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |