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.
[...] 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 |