Powershell query to find all GPO's linked to Active Directory site

s r 1 Reputation point
2020-05-26T12:27:27.447+00:00

Hello,

I have to check if some group policies are applied. The group policies are mostly linked to Active Directory sites.
Is there a way to query all AD sites and get its linked group policies with Powershell?

Could not find any hints how to build such a query.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,216 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Dave Patrick 426.1K Reputation points MVP
    2020-05-26T12:44:45.657+00:00

    Some of these may help or you can also modify to suit your needs.

    https://gallery.technet.microsoft.com/scriptcenter/site/search?query=list%20gpos&f%5B0%5D.Value=list%20gpos&f%5B0%5D.Type=SearchText&ac=4

    --please don't forget to Accept as answer if the reply is helpful--


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    0 comments No comments

  2. Manu Philip 16,986 Reputation points MVP
    2020-05-26T12:51:58.393+00:00

    Hi,
    gpresult /r will help you to get a detailed list of group policies applied over.

    Also check options such as
    gpresult /r /scope:user
    gpresult /r /scope:computer

    Please mark as "Accept the answer" if the above steps helps you. Others with similar issues can also follow the solution as per your suggestion

    Regards,

    Manu

    0 comments No comments

  3. Roy Li - MSFT 32,091 Reputation points Microsoft Vendor
    2020-05-27T02:04:26.31+00:00

    Hello,

    Welcome to Microsoft Q&A!

    Currently, Microsoft Q&A supports the products listed over here: supported topics (more to be added later on).

    There is a better place you could ask your question about PowerShell - Windows PowerShell Forum.

    Thank you.

    0 comments No comments