• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Dynamic printer mapping?

reveille_83

Limp Gawd
Joined
May 16, 2006
Messages
238
Hello,

I have a spare server kicking around and I was looking to convert it to a Printer Server. My question is -

Is it possible to have a group policy that pushes printers? In other words I have 5 networked printers that I'd like to give access to everyone or maybe certain people without going to each machine and manually install them. Is this possible? Or is there anything out there that is similar to what I want to do available?
 
You can set permissions for each printer, and also connect certain groups only to certain printers in the login script. Is this what you're trying to do?
 
You could certinaly run a script that did simple unc's i.e.
//server/printer

That should automaticly add the printer..
 
I use login scripts to map printers, network drives and set the default printer. I am no scripter per say, but if you get the chance, look into them, they will make your life much easier!
 
As pigster mentioned, use a login script to map printers.

Push printers you may, with Windows Server 2003 R2.
 
How difficult is it to push printers with the logon script? Can you perhaps give me a for example of what it would look like ?
 
Try this

Code:
Set wshNetwork = WScript.CreateObject( "WScript.Network" )
'
'Remove old mapped printers first (but not local printers)
'
Set WSHPrinters = WSHNetwork.EnumPrinterConnections
For LOOP_COUNTER = 0 To WSHPrinters.Count - 1 Step 2
    If Left(WSHPrinters.Item(LOOP_COUNTER +1),2) = "\\" Then
        WSHNetwork.RemovePrinterConnection WSHPrinters.Item(LOOP_COUNTER +1),True,True
    End If
Next
'
'Now add your network printers
'
WshNetwork.AddWindowsPrinterConnection "\\servername\printername1"
WshNetwork.AddWindowsPrinterConnection "\\servername\printername2"
'
'Set one as default
'
WshNetwork.SetDefaultPrinter "\\servername\printername1"

servername and printername are changed to suit, of course :p
 
If you want, I also have a script that will query the AD for published printers and connect to all of them. There's also a bit about searching for a printer group and making it the default. It could easily be tailored only to connect to the certain printers for certain groups. Unfortunately I haven't built in security permissions yet, so it fails if a user isn't granted perms to a printer - i can post it if anyone is interested.
 
Printer publishing via scripting can also check group membership and/or OU membership to set their printer(s) and default printer.
 
Set wshNetwork = WScript.CreateObject( "WScript.Network" )
'
'Remove old mapped printers first (but not local printers)
'
Set WSHPrinters = WSHNetwork.EnumPrinterConnections
For LOOP_COUNTER = 0 To WSHPrinters.Count - 1 Step 2
If Left(WSHPrinters.Item(LOOP_COUNTER +1),2) = "\\" Then
WSHNetwork.RemovePrinterConnection WSHPrinters.Item(LOOP_COUNTER +1),True,True
End If
Next
'
'Now add your network printers
'
WshNetwork.AddWindowsPrinterConnection "\\pcmsrv\HP4000"


This does not map the pritner for me. What am I missing?
 
reveille_83 said:
won't this cause the dialog box to come up asking if you want to open up the vbs file?

Doesn't on my networks/workstations, how about for you?
 
reveille_83 said:
bump.

i wanted to know if anyone uses a script to push printers based on a dist. group?

Nope, security group. Although I don't see why you couldn't. Querying AD for group membership should return both.
 
reveille_83 said:
oh okay, security group. what is entailed with this?

do you know vbscript at all? I'll post my script, but it's a little hacky and may need to be modified. it'd still be a useful starting point.
 
reveille_83 said:
bump.

i wanted to know if anyone uses a script to push printers based on a dist. group?

If you look here you'll find a script to map drives based on group membership. The same script would work for mapping printers
 
reveille_83 said:
Pigster,

what would i have to replace in that script to map a printer?

Where it says

Code:
Set objNetwork = CreateObject("Wscript.Network")
objNetwork.[COLOR=Red]MapNetworkDrive "X:", [/COLOR] "\\atl-fs-01\finance"

Change that to

Code:
Set objNetwork = CreateObject("Wscript.Network")
objNetwork.[COLOR=Red]AddWindowsPrinterConnection [/COLOR] "\\atl-fs-01\printer1"
 
So much work for such an easy task.... tsk tsk tsk.....

google con2prt.exe

It will make life MUCH easier for alot of your guys.

con2prt /cd \\server\XeroxDoc
con2prt /c \\server\XeroxDoc.2

Just push the con2prt.exe to the workstations c:\windows directory.

Wanna change a printer?? Pas de probleme!

con2prt /f
con2prt /cd \\church-server\HPDoc
con2prt /c \\church-server\HPDoc.2

Voila!!
 
QwertyJuan said:
So much work for such an easy task.... tsk tsk tsk.....

How so? He wants to have certain people attach to certain printers, so you have to use scripting. At that point is

Code:
con2prt /c \\server\XeroxDoc.2

that much more elegant than

Code:
objNetwork.AddWindowsPrinterConnection  "\\server\XeroxDoc.2"

Besides, you have to push con2prt.exe to all the clients, whereas scripting is built in.
 
Back
Top