[gptalk] Re: GP make printing impossible

  • From: "Martin Hugo" <Martin_Hugo@xxxxxxxx>
  • To: gptalk@xxxxxxxxxxxxx
  • Date: Fri, 21 Sep 2007 16:09:27 -0400

Craig,

There are many ways to take care of "selective" Gp Policies but we would
be exchanging emails forever without some more info.  The printer scripts
are easy to deploy via Gp Pol.  Once you have your vbs scripts done (saved
as scriptname.vbs) on whatever basis you wish (you can deploy multiple
printers via one script) you just apply them in Gp Pols, for example:

[code]
Dim objNetwork, strPrinterPath
strPrinterPath = "\\<servername>\<printersharename>"
Set objNetwork = CreateObject("WScript.Network") 
objNetwork.AddWindowsPrinterConnection strPrinterPath
strPrinterPath = "\\<servername2>\<printersharename2>"
Set objNetwork = CreateObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection strPrinterPath
objNetwork.SetDefaultPrinter "<servername>\<printersharename>"
wscript.quit
[/code]

Would install two printers, making the first one the default (this is
optional of course).

Then you could create a Gp Pol to add these printers via a login script
entry (Under Windows Settings) in the user portion of a Gp Pol applied to
a specific computer OU.  Then, when a user logs in to a computer in that
OU, they get those printers.  You should also create a logoff script that
substitutes "RemovePrinterConnection" for "AddWindowsPrinterConnection" to
remove the printers when they logoff since it might throw errors on
subsequent logons if the printers are already there.  If you edit the Gp
Pol perms you can even not have it apply to all users, just those for whom
you set the permissions.

It all depends on your AD structure and how you want to administer it. 
Remember that the built-in Computer and User containers are just that,
containers, you can't apply Gp Policies to them.

The only down side to this that I have found is that once you start
scripting you can't stop because it's so cool.  Before you know it you
will have a SYSVOL the size of Texas.

GL.

Martin T. Hugo
Network Administrator
Hilliard City Schools
Tel: 614-921-7102
Martin_Hugo@xxxxxxxx

gptalk@xxxxxxxxxxxxx writes:
>
>Hi Steve
> 
>Thanks for the feedback - i was hoping there is another way as i have
>absolutely no scripts running on my network so i don't know them at all.
>Is it easy to learn them or are they quite difficult?
> 
>BTW i just got a phone call from a technician that wants to access the
>Control Panel as the domain user and cannot. Same story like my previous
>post. Is my only way out a script?
> 
>Craig
>
>
>
>---------------------------------------------------------------------------
>Subject: [gptalk] Re: GP make printing impossible
>Date: Fri, 21 Sep 2007 12:09:18 +0100
>From: Steve.Rochford@xxxxxxxxxx
>To: gptalk@xxxxxxxxxxxxx
>
>   
>
>
>A common technique is to do this with a logon script ? the printer is
>specific to the user so adding it as admin won?t put it there for the
>next user.
>
> 
>
>Assuming you have a vbscript logon script then adding something like:
>
> 
>
>Set oNetwork=createobject(?wscript.network?)
>
>oNetwork.addwindowsprinterconnection ?\\server\printershare?
>
>oNetwork.setdefaultprinter ?\\server\printershare?
>
> 
>
>will do the job ? obviously, you need to add the proper server and share
>name and you?ll need logic to determine those (could be based on user or
>computer or both)
>
> 
>
>There?s loads of examples in the MS script centre [
>http://www.microsoft.com/technet/scriptcenter/default.mspx
>]http://www.microsoft.com/technet/scriptcenter/default.mspx 
>
> 
>
>If you?re running 2003 R2 then you can do it with group policies - [
>http://technet2.microsoft.com/WindowsVista/en/library/ab8d75f8-9b35-4e3e-a344-90d7799927231033.mspx?mfr=true
>]http://technet2.microsoft.com/WindowsVista/en/library/ab8d75f8-9b35-4e3e-a344-90d7799927231033.mspx?mfr=true
>has some details. Although it?s in the Vista library it?s nothing to do
>with Vista at all!
>
> 
>
>Steve
>
> 
>
>
>
>
>From: gptalk-bounce@xxxxxxxxxxxxx [mailto:gptalk-bounce@xxxxxxxxxxxxx] On
>Behalf Of Craig Meyer
>Sent: 21 September 2007 11:49
>To: gptalk@xxxxxxxxxxxxx
>Subject: [gptalk] GP make printing impossible
>
>
>
>
> 
>
> 
>
>
>
>
>Hi all
>
>
>
>
> 
>
>
>
>
>I have a GP that prevent users to add a printer so obviously if i want to
>install a printer i need to log off and on as the admin. When i do that i
>can install the printer successfully but when i log back on as the user i
>cannot see the printer. How do i overcome this
>
>
>
>
> 
>
>
>
>
>BTW , what i then did was to make the user a domain admin and i could
>install the printer but obviously that is the wrong way. I also do not
>want to disable the GPO as they delete and change settings in their
>printer setup.
>
>
>
>
> 
>
>
>
>
>Win xp pro and Win 2003 Server
>
>
>
>
> 
>
>
>
>
>Craig Meyer 
>
> 
>"He had no servants - yet they called Him Master, no degrees - yet they
>called Him Teacher, no medicine - yet they called Him Healer, no army yet
>the Kings feared Him. He won no military battles yet He conquered the
>world. he commited no crime yet they crucified Him. He was burried in a
>tomb yet He lives 2day....?
>
>
>
>
> 
>
>
> 
>===========================================================================
>
>
>Download the latest version of Windows Live Messenger NOW! [
>http://get.live.com/en-za/messenger/overview ]Click here!
>
>
>
>
>---------------------------------------------------------------------------
>Download the latest version of Windows Live Messenger NOW! [
>http://get.live.com/en-za/messenger/overview ]Click here!

Other related posts: