Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 4 down vote accepted

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

share|improve this answer
    
Awesome. Still need to do this manually whenever I add a printer, but it's not that big of a deal. Thanks. –  Joel Coel Aug 21 '12 at 23:33
1  
Glad you found it helpful. You can actually set a scheduled task triggered by an event 306 in the PrintService event logs (if you enable those logs) to run the script for you. I setup a new queue today and it triggered the script when I listed it in the directory. –  user132976 Aug 21 '12 at 23:58

Use ADSI Edit.

Browse to the server object.
CN=Servername,CN=Computers,DC=Domain

Locate the printer you want to change and open the properties.

CN=Servername Printername

In attribute editor, scroll down to "serverName", modify the value to what ever you want.

share|improve this answer

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

share|improve this answer
2  
Warning that this will affect all services published by the server in Active Directory, not just Printers. –  Chris S Jun 7 '12 at 20:32
    
Edited the answer to reflect the additional step necessary for AD advertisement. –  jfalcon Jun 7 '12 at 20:48
    
Doesn't work... I can already manually add a \\cname\printername share, which is what that post covers. The problem is that if I find the printer in active directory it connects via \\hostname\printername instead, and I want to active directory to use the cname when users connect to the printer. –  Joel Coel Jun 7 '12 at 22:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.