General discussion

Locked

Default Printer Mappings by location or PC name

By joshhansen ·
We have 4 network printers in 1 location. I want to make sure that certain computers always have certain printers set as default no matter who logs on. How can this be done by logon script? My ideal way would be to add certain computers to an active directory group and then have a user logon script run which would set the default printer based on the computers group membership.

This conversation is currently closed to new comments.

9 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by BFilmFan In reply to Default Printer Mappings ...

Might be the simplest solution if you plan to have all the users in the same OU. If you plan to use sub-OU's, you could do it via GPO.

If you wanted to get truly fancy, you could do it via GPO and filter it by security group, but this will increase the GPO processing time on the end systems. This might or might not be an issue depending on the size of your environment and speed of the links between Active Directory sites.

Collapse -

by joshhansen In reply to

This answer is user based. I need a PC based solution so that when any domain member logs on to a particular computer, it's default printer will be the one it is supposed to be without anyone having to manually set it.

Collapse -

by razz2 In reply to Default Printer Mappings ...

You could write one script and have it check membership for you.

Use the Resource Kit tool ifmember.exe.

It is available for download here:

http://www.microsoft.com/windows2000/techinfo/reskit/tools/new/ifmember-o.asp

And instructions are her:

http://www.microsoft.com/resources/documentation/WindowsServ/2003/all/techref/en-us/Default.asp?url=/Resources/Documentation/windowsserv/2003/all/techref/en-us/ifmember.asp

Good Luck,

razz

Collapse -

by joshhansen In reply to

This answer is user based. I need a solution that is PC based so that when any domain member logs on to a particular computer, it's default printer will be the one it is supposed to be without anyone having to manually set it.

Collapse -

by ccollins In reply to Default Printer Mappings ...

On the OU containing the computers place a GPO with the logon printer script in the User Configuration section of the OU. That way anyone who uses the machine gets the machine default printer through a log on script (net use or Object.AddWindowsPrinterConnection). You can modify which machines this applies to by defining a group in the GPO scope.
This works as long as you keep an eye on enforced user-based GPOs which will override it.

Collapse -

by joshhansen In reply to

I have tried that without success. I created a gpo with the user logon script defined. I then turned on loop back processing so that the user logon script will run when any user logs on to the PCs listed in the OU. In the security filter of the GPO, I removed authenticated users (so that it won't run on every pc in the ou) and then specified only the PCs in the OU I wanted the logon script to run. It didn't work. It does work if I specify user accounts or user groups in the GPO security filter but not computer accounts or computer groups. Am I missing something?

Collapse -

by ewgny In reply to Default Printer Mappings ...

You are correct. You can use a logon script that queries LDAP/Active directory for group membership, then installs or sets a printer as default based on that membership
It can work based on the user "objuser" or the computer "objcomputer"
See this link
http://tinyurl.com/4zzvq
He has written and shared a lot of good scripts
Within this script "Logon #3"
Replace the "front office" with the name of the global group you create. that contains the computer objects you want to control

If IsMember(objComputer, "Front Office") Then
objNetwork.AddWindowsPrinterConnection "\\PrintServer\HPLaser2"
objNetwork.SetDefaultPrinter "\\PrintServer\HPLaser2"
End If

I use this method to install and set default printers based on both user group and computer group membership
and it works well.

Collapse -

by joshhansen In reply to

Your awesome!

Collapse -

by joshhansen In reply to Default Printer Mappings ...

This question was closed by the author

Back to Windows Forum
9 total posts (Page 1 of 1)  

Related Discussions

Related Forums