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)
![Graphical user interface, application, Word
Description automatically generated](https://vmvirtual.blog/wp-content/uploads/2023/03/graphical-user-interface-application-word-descr.png)
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.
![A screenshot of a computer
Description automatically generated](https://vmvirtual.blog/wp-content/uploads/2023/03/a-screenshot-of-a-computer-description-automatica.png)
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:
![Graphical user interface, text, application, email
Description automatically generated](https://vmvirtual.blog/wp-content/uploads/2023/03/graphical-user-interface-text-application-email-1.png)
Now we access DEM and configure the part of logon Task
![Graphical user interface, application, Word
Description automatically generated](https://vmvirtual.blog/wp-content/uploads/2023/03/graphical-user-interface-application-word-descr-1.png)
![Graphical user interface, application
Description automatically generated](https://vmvirtual.blog/wp-content/uploads/2023/03/graphical-user-interface-application-description.png)
![Graphical user interface, text, application, email
Description automatically generated](https://vmvirtual.blog/wp-content/uploads/2023/03/graphical-user-interface-text-application-email-2.png)
In my case I also impose a condition that only the user fstorni can perform this task
![Graphical user interface, text, application, Word
Description automatically generated](https://vmvirtual.blog/wp-content/uploads/2023/03/graphical-user-interface-text-application-word.png)
We save everything
![Graphical user interface, application
Description automatically generated](https://vmvirtual.blog/wp-content/uploads/2023/03/graphical-user-interface-application-description-1.png)
At the next logon the user fstorni will map the printer, and we can check from the DEM logs:
![](https://vmvirtual.blog/wp-content/uploads/2023/03/word-image-814-9.png)
While all other users will not be able to map the printer
![](https://vmvirtual.blog/wp-content/uploads/2023/03/word-image-814-10.png)