Monthly Archives: October 2017

No Script Needed: List all GPOs related to Skype or Lync for your domain.

I saw a question out there asking if there was a script to list the group policy objects in an organization related to Lync or Skype settings.   I’m not aware of one, but I didn’t really look.  I did know that it was possible to check thanks to Pat Richard’s QOS Calculator which includes a tab that generates the PowerShell code to create a GPO for you (seriously, that’s a heck of a tool).  So, I figured I’d take a break and whip the following command up to answer the question, keep in mind I ran it directly from my domain controller as you’ll need the RSAT installed to get the PowerShell module for the GPO.

Get-GPO -all | foreach { if ((Get-GPOReport -guid $ -ReportType XML) -match “Lync|Skype”) {write $_.DisplayName}}

*UPDATE: Pat Richard has already optimized my PowerShell command.  New smaller command can be seen above.