Group Policy

GPO functions

Article Simplify Group Policy Administration with Windows PowerShell

Code download

http://download.microsoft.com/download/f/d/0/fd05def7-68a1-4f71-8546-25c359cc0842/GroupPolicy2007_05.exe

 

Call this script in your profile file so you will always have access to these functions Microsoft.PowerShell_profile.ps1

#Call other scripts

#$(Split-Path $profile -parent) is getting the profile directory sometimes it is H:

. "$(Split-Path $profile -parent)\Set-Prompt.ps1"

. "$(Split-Path $profile -parent)\GPMC PowerShell Functions.ps1"

 

Get-Command -CommandType function *gpo*

BackupAllGpos C:\scripts\gpoBackup domainName

GetAllBackedUpGpos C:\download\gpoBackup | ft -Property GPODisplayName, GPODomain, GPOID

GetBackupByNameOrId C:\download\gpoBackup DisablePatchlinkServie

restoregpo -backupDirectory C:\download\gpoBackup -backupId DisablePatchlinkService -domainName domain.local