We help IT Professionals succeed at work.

Group policy powershell question

Alex
Alex asked
on
45 Views
1 Endorsement
Last Modified: 2019-04-02
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}
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2019
Most Valuable Expert 2018
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
AlexA lack of information provides a lack of a decent solution.
CERTIFIED EXPERT

Author

Commented:
Thanks buddy
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.