Windows Thread, Pushing printer installs from Windows 2003 R2 in Technical; I just received this months 'Software Shelf Enterprise Online Newsletter' and it included this very useful set of instructions for ...
I just received this months 'Software Shelf Enterprise Online Newsletter' and it included this very useful set of instructions for printer management via GPO on 2003 R2 and XP:
---- How can I deploy a printer to clients by using Windows Server 2003 R2?
Windows Vista and Longhorn Server will provide printer publishing using native Group Policy. In the interim, Windows 2003 R2 allows printers to be pushed out via Group Policy and a small piece of client-side code that runs as part of the logon process. It looks at Group Policy and checks which printers it should add, then adds them. Your Active Directory (AD) needs to be running the Windows 2003 R2 schema changes that support printer deployment. To deploy printers, follow this process:
First, on the Windows 2003 R2 server, you need to add the Print Management Component:
Start the "Add or Remove Programs" Control Panel applet (Start, Settings, Control Panel, Add or Remove Programs, "Add or Remove Windows Components," "Management and Monitoring Tools," then check the Print Management Component.
Click Next and when prompted, point to the Windows 2003 R2 disk 2 location.
Click Finish.
A new Print Management snap-in is now available in the Administrative Tools folder. To deploy a printer, perform these steps:
1. Start the Microsoft Management Console (MMC) Print Management snap-in (Start, Programs, Administrative Tools, Print Management).
2. Expand the Print Servers branch, then expand the print server hosting the printer and select Printers.
3. Right-click the printer you want to deploy with Group Policy and select "Deploy with Group Policy."
4. Click Browse to select the Group Policy Object (GPO) name to use.
5. Click the "new" GPO icon (or select an existing GPO) and name it Deploy Printers. Click OK.
6. Check either or both "The users that this GPO applies to (per user)" or "The computers that this GPO applies to (per machine)" and click Add.
7. Click OK to the deploy dialog box.
8. Make sure the GPO you created (if you created one) is linked to a domain or OU to ensure that users and computers receive the pushed printer. When you open the GPO you'll notice a new Deployed Printers branch, which lists deployed printers in the GPO.
Currently the selected printer won't deploy because the client doesn't understand the Group Policy settings since they're new to R2 and not expected by older clients; you need to configure the PushPrinterConnections.exe utility (found in the %systemroot%\PMCSnap folder) to execute. To do so, perform these steps:
1. Open the Microsoft Management Console (MMC) Group Policy Object Editor and open the GPO you used for the printer deployment.
2. If the printer is deployed to users, navigate to User Configuration, Windows Settings, Scripts (Logon/Logoff); if it's deployed to computers, navigate to Computer Configuration, Windows Settings, Scripts (Startup/Shutdown).
3. Right-click Startup or Logon, and click Properties.
4. In the Logon Properties or Startup Properties dialog box, click Show Files. The location of the folder used at logon is shown in the Address field (e.g., \\savilltech.com\SysVol\savilltech.com\Policies\{E AB0039E-A677-4C89-9CF2-053576CDA1FC}\Machine\Scripts\Startup).
5. Copy and paste the PushPrinterConnections.exe file from the c:\windows\PMCSnap folder to this location and close the window.
6. In the Logon Properties or Startup Properties dialog box, click Add.
7. Enter "PushPrinterConnections.exe" in the Script Name box (to enable logging, enter "–log" in the Script Parameters box). 8. Log files are written to %windir%\Temp\PpcMachine.log (for per-computer connections) and %temp%\PpcUser.log (for per-user connections) on the computer on which the policy is applied).
Click OK
For per-user deployed printers, you now need to log off, then log on; for per-machine printers, you need to restart the targeted computer.
I've tried to get this working before just after server 2003 R2 was released when we were building our new network over the summer. I couldn't get it to work thou
Might have another go sometime. At the moment I've got a VBS script that does a simelar thing, mapping printers according to the active directory container the machine account is in.
I run this as a logon script in active directory, along side another script I have which maps drives according to Group membership.
I can't remember what happened when we tried deploying printers using Active Directory, all I know is it didn't work! With half term next week, I might have the time to try it again although the VB script is working a treat at the moment. Why fix what isn't broke!
OK, it turned out that the test machine we were using does not want to pick up very much from the AD, no software installs or printers but it does apply the user policies (?). We had it in a test OU so we didn't notice the lack of software installation until I added it to an existing OU.
In desperation we tried a different test machine and it worked a treat.
Although its good for pushing out printers to whole suites (in their own OU) it isnt very useful if for example one of the admin staff ask to print to another printer, as I would need to push it to just one PC in the OU
Is there any way of doing this in a tidy way, because the only way I can think of is applying the printer to the whole OU but only giving that specific machine access to read the GPO
Also, is there a script or something by which I can remove printers that have previously been added manually? Because I want to get all our printers deployed using this but at the minute it would just cause duplicates of whats already present on the machines
Because the script is error trapped, if a particular printer doesn't exist on a workstation, it will just skip that line, so you could potentially use one script to remove all your printer connections from all your workstations at logon. Problem is it will also remove the connections added by the script, so you'll probably have to run this on all your workstations first to remove the connections before re-deploying them, and as it only works as a logon script, you'll have to log onto all your workstations one at a time for the connections to be removed.
Solution might be to rename your printers, add the new names and remove the old names using the script.
Also this script could be adapted to deploy to an individual workstation name, or possibly an individual username, as VBscript can read the workstation names and usernames from the environment, so you can use a simple if...then statement to achieve this.
Here's one Heebeejeebee and I discovered that classifies for "WTF", It's a problem we were suffering, that somebody else may encounter which we found a solution for.
We're documenting it here for any poor bugger who suffers the same fate.
The problem being is that PushPrinterConnections.exe doesn't always do what it says on the tin.
Picture this: You have printers set up on a per-machine basis and drag a machine from one OU to another OU in active directory. These OU's have totally different printers assigned to them via two different GPOs.
THEORETICALLY PPC should drop the old printers and add the new ones.
What happens in reality is that it DOES add the new printers, but does it remove the old ones? HELL NO.
So... you move it back to the old OU, but to no avail, now you have both OU's printers assigned to that machine despite being a member of only one exclusive OU. Nice one Microsoft.
WHAT DO YOU DO?
Firstly you have to remove the printer from the GPO via the Print Management Console (removing it via AD does sweet f-all). You go to deploy, remove them, and that drops the printers from everything that has that GPO, including the one that is 'no longer assigned but really is'.
But you're not done yet, if you try re-deploying the printer at this stage to the GPO you will have the printer show up again for not only the printers that are assigned to the OU containing the GPO, but also our fubared machine that isn't.
So what do you do now? You have to fully remove the GPO. Yes that's right, totally delete it. Unlinking it won't help you.
You have to totally demolish the GPO, recreate it and then re-deploy the printer again (via PMC).
What a load of agro.
Microsoft seem to have overlooked the fact that we might want to remove printers via AD and not PMC so be very careful when dragging machines around in AD or else you'll find there are printers that just don't disappear.