Article Simplify Group Policy Administration with Windows PowerShell
Code download
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