Share via


Scripts I Mentioned

Hey everyone at MMS (or TechReady, or anywhere for that matter)

  If you've followed my advice and you're checking the blog, here's a neat little present for you!

 Did someone make 1000 GPO's with the word 'test' in them just to test out some sweet new PowerShell script? Do you want to punch them in the face for bloating your environment?

No need! Do what I did, make a list of all of the GPO's with 'test' in the name ('contains' is case sensitive, so be mindful of that).

 $listTest = get-gpo -all | where {$_.DisplayName.contains("test")}

foreach ($GPO in $listTest) {remove-GPO $GPO.DisplayName}

Done!

 

Here are the scripts I've mentioned in today's presentation:

Search for any setting using the XML report:

  https://blogs.technet.com/grouppolicy/archive/2009/04/14/tool-images.aspx 

Backup all changed GPO's in the last month:

https://blogs.technet.com/grouppolicy/archive/2009/03/26/powershell-script-backup-all-gpos-that-have-been-modified-this-month.aspx

 Enjoy!

 your friendly @superlilia

Comments

  • Anonymous
    January 01, 2003
    Why do the policies in the linked group policy objects of the OU show up in the inherited group policies of the same OU ? Will they get executed twice?