Mapping printers using a NetBIOS alias

Posted on 2006-05-24
Last Modified: 2008-01-09
I am configuring the majority of my network printers on a server called FILESRV01.  I have given this server the NetBIOS alias PRINTER, and I want all users to map their printers using the alias, so that if I ever change the name of this server or move the printers to another server, no desktop reconfiguration will be required.

I have published the printers in Active Directory using the PRINTER alias, and the printer objects in AD are named according to the alias.  However, when I search for a printer using the "Find printer in the directory" option in the Add Printer Wizard, the printers listed are identified as being on FILESRV01 rather than PRINTER, and if I select one of these printers, it is mapped locally as "<printer name> on FILESRV01.

For example, I have a printer called LaserJet05, and when I published it in AD, I used the UNC "\\PRINTER\LaserJet05".  The printer object was automatically named "printer-LaserJet05".  However, when I add a printer on a client computer using the Add Printer Wizard's "Find printer in the directory" option, the server name for LaserJet05 shows up as FILESRV01, and if I select it, I get a network printer in my profile called "LaserJet05 on FILESRV01".  I want to have the printer mapped as "LaserJet05 on PRINTER", so that if the alias PRINTER is moved to another server, or FILESRV01 is renamed at some point in the future, the users' mappings to the printer will not need to be changed.

To make sure that there is no confusion regarding what the issue is, I'd like to clarify:  
- I have disabled strict name checking in the registry on FILESRV01
- I have verified that it is possible to explicitly map a printer using the PRINTER alias – if I select the "Connect to this printer" option in the Add Printer Wizard and provide the UNC "\\PRINTER\LaserJet05", then I get a network printer called "LaserJet05 on PRINTER".
- Printers mapped using the alias PRINTER rather than the primary name FILESRV01 work fine, and I have verified that if the PRINTER alias is moved to a different server that has a printer with the same name and same driver, the change is seamless to users that have the printer mapped using the alias.

The problem is not with getting printers mapped using the alias to work, the problem is that I want users to be able to use a directory search to find printers, and have the printers mapped using the alias rather than the print server's primary name, but despite the fact that I published them in AD using the alias, and the AD object was automatically named using the alias, directory searches find the server's primary name instead.
Question by:AvivaUSA
    LVL 51

    Expert Comment

    That's because there is no such object in the Directory called "PRINTER" - it's a DNS alias, not an actual object.  The LDAP search will only bring up objects in the Directory.

    The only way to automate this would be via scripting called by a logon script.  

    LVL 1

    Author Comment

    It's not just a DNS alias, it's a NetBIOS alias that FILESRV01 registers and recognizes as its own (I did also create a CNAME in DNS, but that's peripheral).  As for the objects in the directory, if we're talking about the printer objects, as I mentioned above, I created them using the alias, and the objects are named "PRINTER-<printer name>".  When you create a new printer object, you provide a UNC, not an object name, and AD automatically names the object based on the UNC, e.g. if you create a printer object and enter the UNC "\\server\printer_name" in the "New Object - Printer" dialog box, the object will be named "server-printer_name".  In this particular example, I entered the UNC "\\PRINTER\LaserJet05", and AD named the object "PRINTER-LaserJet05".  So, the objects in the directory, as far as I can tell, refer only to the alias name, not the primary name.

    However, it just occurred to me that I might be overlooking the obvious.  Perhaps, despite the object's name, the object has some attribute that points it to the print server's primary name.  I'll have to check into that.

    (Note, BTW, that I'm not trying to automate anything.  I just want the printers to be configured using an alias that I can transfer from server to server as necessary, rather than having clients point to a particular server.  Having to remap printers using a script if the print server name changes is exactly what I'm trying to *avoid* by doing this.)
    LVL 1

    Author Comment

    That's exactly what it turned out to be.  AD names the printer object according to the UNC you provide, but the attributes that determine the server name and UNC returned in a directory search point to the server's primary name.  The attributes are serverName and uNCName.  So, in the example above, the object "PRINTER-LaserJet05" had serverName set to "FILESRV01", and uNCName set to "\\FILESRV01\LaserJet05".  I changed them with ADSI Edit to "PRINTER" and "\\PRINTER\LaserJet05", respectively, and now everything works the way I wanted it.  Pretty silly if you ask me, the printer object should be created using the name provided.

    Please close this question and PAQ.
    LVL 1

    Accepted Solution

    PAQed with points refunded (500)

    Community Support Moderator

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
    Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now