How can I list the cname location of a printer in Active Directory?

I'm working on a new print server running Windows Server 2008 R2. The shared printers will be listed in Active Directory. The print server has a host record with one name, but I want to users to connect using a different name, setup via a cname record on the dns server.

The problem is that these shared printers are listed in Active Directory using the host A record. I can choose to add the printer via the \\cname\printername share, but if I find the printer in Active Directory it will connect to the printer on the user's computer via \\hostname\printername instead, and this difference is highly visible to end users. I would like the printers to be listed using the cname record, such that when users connect to a printer all they see is the cname.

Is this possible?


Solution 1:

I was looking for a solution to this same problem and found that the "uNCName" property of the printqueue object in AD simply needs to be changed from \\servername.domain.com\printerName to \\alias.domain.com\printerName. Scripts to accomplish this are available here: http://jthiede.wordpress.com/2012/08/20/list-a-printer-in-active-directory-using-a-cname/. The scripts use Quest Active Roles (http://www.quest.com/powershell/activeroles-server.aspx) so that will need to be installed wherever you run the scripts. Here is the basic syntax:

set-QADobject SERVER-printer -objectattributes @{servername=”alias.domain.com”;shortservername=”alias”;uNCName=”\\alias.domain.com\printer”}

Hope this helps!

-Jason

Solution 2:

You need to register the SPN's into active directory.

setspn.exe –a host/CNAME computerobject

Reference: http://daddyr.blogspot.com/2010/12/cname-on-windows-2008-r2-server-print.html