On Windows PowerShell and other admin-related topics

Automate Group Policy Preferences printer-management using Windows PowerShell

I`ve written a couple of blog posts earlier on Group Policy Preferences and printer deployment using Group Policy.

Using Group Policy Preferences is a very flexible way to deploy printer connections. This is also very manageable in smaller environments. What if you got hundreds, or even thousands of printer connections you need to deploy? Do you want to sit down and make several thousands of mouse clicks to accomplish the task? There are better alternatives!

Based on SDM Software`s Group Policy Automation Engine, I`ve created a script module to handle this. The script module are available from this link.

Save the script module as a psm1-file in the following directory: %userprofile%\Documents\WindowsPowerShell\Modules\GPPreferencesPrinters
You need to manually create the 3 subfolders under %userprofile%\Documents if they doesn`t exist.

When done, start Windows PowerShell and type the following command:


You should now see the GPPreferencesPrinters module.
Import the module with the Import-Module cmdlet:


As you can see there are two functions in addition to SDM Software`s cmdlet: Add-GPPreferencesPrinter and Get-GPPreferencesPrinter.

Example 1:


Example 2:

If you got the printers listed in an Excel spreadsheet, save the document in csv-format:


The csv-file may be used like this to import the printer connections:



Additional functions and parameters will later be added to the script module, i.e. Remove-GPPreferencesPrinter and Item-Level Targeting. Note that example usage for Item-Level Targeting are provided in the Group Policy Automation Engine User Manual.


January 18, 2010 - Posted by | Active Directory management, Deployment, Group Policy, Print management, Scripting, Windows PowerShell


  1. […] out the article at Automate Group Policy Preferences printer-management using Windows PowerShell « Jan Egil`s Admin-Bl… Tags: Group Policy Preferences, power shell, Printer Category: Other Site Links […]

    Pingback by Group Policy Center » Blog Archive » Automate Group Policy Preferences printer-management using Windows PowerShell | January 18, 2010 | Reply

  2. Have you yet modified this Powershell script so that it can be used to also configure Group Policy Preferences with Targeting to Active Directory Security Groups? In Jan 2010 you mentioned you’ll add Item-Level Targeting. Is there an updated version with this feature? Thank you for your time.

    Comment by Jason Pearce | June 30, 2011 | Reply

    • Hi,
      Unfortunately I haven`t had the time to do that yet.

      Comment by Jan Egil Ring | June 30, 2011 | Reply

  3. […] Automate Group Policy Preferences printer management using Windows Powershell. Report: List AD sites not defined in SCCM boundaries No comments yet. […]

    Pingback by Christjan's IT Minutes » Sample scenarios of dynamic printer deployment with Group Policy Preferences | July 7, 2011 | Reply

  4. With PS3 in the horizon. Would you find any good reason to not wait for it, and still choose the ‘Group Policy Automation Engine’ from SDM Software wanting to mess with GP Preferences through Powershell?

    Comment by Anders | February 2, 2012 | Reply

    • I couldn`t see any new features in the Group Policy module in the Developer Preview of “Windows Server 8”, but I guess we can hope for some new features in the upcoming beta. Until then I still see great value in the SDM GPAE.

      Comment by Jan Egil Ring | February 14, 2012 | Reply

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: