Search code examples
powershellguidgpo

Where can I find the name or GUID of an GPO


first of all I’m quite new to GPOs and PowerShell

What i am trying to do is write a script to automatically set up the group policy I want.

After some looking around the best way I found was to use Set-GPRegistryValue. But to use that I would either need a GUID or a name of a policy but I can’t seem to find those.

My Question is where and how can I find the GUID and or name or a policy (or if I should do something entirely different)

Edit: i do not have the "Goup management console" and I cannot find it in windows features


Solution

  • If you're looking to add in a brand new Group Policy, using New-GPO will let you create that (and get the GUID of the created GPO), if you want to get a list of all existing GP Objects, Get-GPO -All will provide it for you.