Link to home
Start Free TrialLog in
Avatar of Alex
AlexFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Group policy powershell question

Peeps,

Just need confirmation that this will work

Text file has the name of the GPO

$GPOs = Get-content c:\temp\gpotoremove.txt
Foreach($GP in $GPOs){Backup-gpo -name $GP -path "C:\GPObackup\$($GP\"}

and to delete

$GPOs = Get-content c:\temp\gpotoremove.txt
Foreach($GP in $GPOs){Remove-gpo -name $GP -confirm $False}
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Alex

ASKER

Thanks buddy