New-Item and Remove-ItemGPOADmin has extended Microsoft’s New-Item and Remove-Item PowerShell commands to add the ability to create and delete items from the GPOADmin version control.
Example # 1:
Create a container name HR
new-item -Path VCRoot:\ -Name HR -ItemType Container
Example # 2:
Create a GPO name HR_GPO in the HR container
new-item -Path VCRoot:\HR -Name HR_GPO -ItemType GPO -Comment "Set the minimum password length to 8 characters"
Example # 3:
Remove the GPO name HR_GPO in the HR container
remove-item -Path vcroot:\HR\HR_GPO
Example # 4:
Remove a container name HR
remove-item -Path VCRoot:\HR
IMPORTANT:Please note that the one thing that GPOADmin cannot do is edit settings from PowerShell. As all the edits use Microsoft's GPEdit we cannot use our code to edit settings. So, to edit GPOs you would have to change settings from the GUID.
To be able to run PowerShell cmdlets for GPOADmin you must load the GPOADmin module first. The following link provides information on how to load this module:
https://support.quest.com/technical-documents/gpoadmin/5.18/user-guide/43#TOPIC-2027395For more information on how to use GPOADmin PowerShell commands and for more examples as the ones listed above to create and remove containers and GPOs please visit the following online technical documentation below:
Using the GPOADmin PowerShell commands (Examples)
https://support.quest.com/technical-documents/gpoadmin/5.18/user-guide/42#TOPIC-2027394