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 $_.id -ReportType XML) -match “Lync|Skype”) {write $_.DisplayName}}

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

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

  1. Pat Richard

    Here’s a better version. Even includes looking for GPOs for Teams, among other optimizations.
    Get-Gpo -All | ForEach-Object {if (((Get-GPOReport -Guid $_.id -ReportType XML) -imatch ‘Lync|Skype|Teams’)) {Write-Output -InputObject $_.DisplayName}}

Comments are closed.