The SDM Group Policy Automation Engine provides a PowerShell interface for getting and setting configuration in Group Policy Objects (GPOs). We utilize a single cmdlet called Get-SDMGPObject. This single cmdlet provides all the secret sauce that makes the magic happen. With that said, this cmdlet has some complexities. These are easy to get around– it just takes practice. In the end you can do everything with Get-SDMGPObject itself. The details of that is for another time.
SDM Provides a PowerShell module called SDM-GPAEScript to supplement the GPAE. This module is a bit of a toolkit and was designed to get people started in building their own automation around the GPAE. It also greatly simplifies some tasks and makes them more powershelly (it’s a word, really… why not!). An example of this is simple to articulate. Here are two ways to reference a GPO, the initial task of all GP Automation with GPAE:
- Get-SDMgpobject -GpoName “gpo://scico.local/<GPOName>” -OpenByName
- Get-GPAEGPO -Displayname “<GPOName>”
Set-GPDeployedPrinter
In the spirit of full disclosure I recorded this 4 times. I found it difficult to talk about it in just a couple of minutes. The reason is that there is a lot to talk about with this product. In the spirit of brevity and to stay focused on the scenario at hand I removed a lot of the background information. This walk through is simple a one-liner that creates a deployed printer in a GPO or allows you to modify and existing printer already in a GPO. Take a look. Let us know what you think.