Among the many features of DEM (Dynamic Environment Manager) to manage the roaming of user profiles (especially when we talk about Horizon Pool Instant Clone), there is the possibility to manage the mapping of printers.
Using this feature is tied to using a Printer Server (at least you must specify the path to the printer with a UNC)
So if we need to map printers that are not managed by print server we can do as follows:
Mapping scripts
We create a mapping script and place it in a network share, reachable by all the Instant Clone VDI that must use it.
The script uses two Windows commands, located in the folder: %WINdir%\System32\printing_Admin_Scripts\en-US\
(en-IT depends on the language used on the Windows 10 environment)
cscript %WINdir%\System32\printing_Admin_Scripts\en-US\prnport.vbs -a -r <name of the thing> -h <IP address> -o -raw -n 9100
cscript %WINdir%\System32\printing_Admin_Scripts\en-us\prnmngr.vbs -a -p “<printer name>” -m “< driver to use>” -r “<thing name>”
The share must have the following permissions:
- At the share level Everyone FullControl
- At the file system level, the group that needs to install the printer must have:
Now we access DEM and configure the part of logon Task
In my case I also impose a condition that only the user fstorni can perform this task
We save everything
At the next logon the user fstorni will map the printer, and we can check from the DEM logs:
While all other users will not be able to map the printer