GPO management using Powershell

Welcome Forums General PowerShell Q&A GPO management using Powershell

This topic contains 4 replies, has 3 voices, and was last updated by

 
Participant
1 year, 3 months ago.

  • Author
    Posts
  • #76620

    Participant
    Points: 25
    Rank: Member

    Greetings,
    What could be the reason behind the Powershell Get-GPInheritance cmdlet returning the value of null in the InheritedGpolinks property? I am able to see the inherited GPO links when I use the GPMC console.

    Regards,

    Yeta.

  • #76810

    Keymaster
    Points: 1,638
    Helping HandTeam Member
    Rank: Community Hero

    As I don't work for Microsoft, it's difficult to guess what the reason might be. Have you considered filing a support ticket? The GPO cmdlets are a supported part of the operating system.

  • #76845

    Participant
    Points: 25
    Rank: Member

    Thanks Don

  • #76881

    Participant
    Points: 1
    Rank: Member

    Need to see what you're trying to run, but could it be because it is a list item and it's misinterpreting what you're asking for?

    This works:

    Get-GPInheritance 'OU=OU1,DC=contoso,DC=com'

    as well as this:

    Get-GPInheritance 'OU=OU1,DC=contoso,DC=com'

    | Select-Object -ExpandProperty GpoLinks

    • #77311

      Participant
      Points: 25
      Rank: Member

      Hello Don Reese,
      I tried all that. There are two properties supplying information about the type of GPO linkages (Directly or Inherited) under the Get-GPInheritance cmdlet. The Gpolinks and the InheritedGpolinks. I cant just figure it out why powershell is returning the InheritedGpolinks with a value of null, even when there's some GPOs linked to the top-level domain container.

The topic ‘GPO management using Powershell’ is closed to new replies.