Search a setting in Group Policy in Powershell?

This topic contains 2 replies, has 3 voices, and was last updated by  js 5 days, 10 hours ago.

  • Author
    Posts
  • #104413

    Jeff Taylor
    Participant

    I want to test if a particular Computer security setting is actually set in any of our domain wide GPO's and found this script:

    https://blogs.technet.microsoft.com/grouppolicy/2009/04/14/check-a-setting-in-all-gpos-security-admx-and-more/

    ...but it had typos (I corrected) and still doesn't work.

    How do I search for say these two settings?

    [Policies\WindowsSettings\SecuritySettings\LocalPolicies\Security Options\]
    Domain member: Digitally encrypt or sign secure channel data
    Domain member: Digitally encrypt secure channel data

    Get-GPOReport is pretty basic.

  • #104428

    postanote
    Participant

    There are lot's of resources that show how to do GPO search with PS, those settings notwithstanding.
    MS powershellgallery.com even has scripts for sort of search.

    Search all GPOs in a domain for a string
    This is a simple Powershell script that uses the Group Policy cmdlets to search for a string within GPOs. The only input is the string to search for.
    'gallery.technet.microsoft.com/scriptcenter/Search-all-GPOs-in-a-b155491c'

    As well as others have provided samples to experiment with... Examples I've looked into previously...

    Find specific setting in GPO
    'powershell.org/forums/topic/find-specific-setting-in-gpo'

    GPO Setting Search Powershell Example
    'activedirectory.ncsu.edu/advanced-topics/scripting-center/gpo-setting-search-powershell-example'

    Powershell – Search all Group Policies (GPO) for a string
    'britv8.com/powershell-search-all-group-policies-gpo-for-a-string'

    Method 2: Searching Group Policy with PowerShell
    'deployhappiness.com/searching-gpos-for-that-specific-setting'

  • #104506

    js
    Participant

    Find all registry settings in a managed gpo https://sdmsoftware.com/group-policy-blog/general-stuff/find-all-registry-settings-managed-in-a-gpo/ Seems silly that get-gpregistryvalue doesn't have a recursive option.

You must be logged in to reply to this topic.