Cool Solution - Printer assignment
From Univention Wiki
The package univention-printer-assignment adds the functionality to your system to assign different printers to selected groups (containing Windows clients) without connecting other printers from the domain to the list of available printers in Windows. If no group contains specific printers, all available printers are connected to the Windows system and leaves the choice of the default printer to the user.
To add the printer assignment to your environment, the package univention-printer-assignment must be installed on the DC Master:
After the installation the provided join script must be run:
Now printers can be assigned to groups, which holds the Windows clients as members. To add printers to a group, open the [Advanced settings] tab and open the module Printer Assignment. Every printer here is added to the VBS script which is later run by the Windows client.
To run the printer assignment script, a generic call line must be added to the logon script. For a Samba 3 setup the path is:
For a Samba 4 setup, the path is
call %LOGONSERVER%\sysvol\<YOUR DOMAIN>\scripts\printerassignment\%COMPUTERNAME%.vbs
Hint: adjust the values according to your setting.
To get a full list of provided UCR variables and allowed values, search for UCR variables starting with printer/assignment:
ucr search --verbose printer/assignment