How to get Client Side Extension (CSE) GUID of a policy area and MMC snap-in GUID of that same policy area?

352 Views Asked by At

I am trying to implement a GPO "Preference" without a domain according to this guide: https://sdmsoftware.com/tips-tricks/group-policy-preferences-in-the-local-gpo-yes/ and since I am not that experienced with GPOs, I dont know how to get those Client Side Extension (CSE) GUID and MMC snap-in GUID pairs for a specific GPO Preference (One drive mapping). In the comments is suggested using "a LDAP query in PowerShell (where the GUID is the GPO one) :

$Object = [adsi]’LDAP://cn={b13e3fa8-6ca2-47fb-8a99-7d8445b1d44b},cn=policies,cn=system,DC=domain,DC=com’
$Object.gPCUserExtensionNames

But when I put that into my PS it throws an error and I probably have to adjust something, but I am pretty clueless about it. So since I cannot comment on the original post for some reason, I ask here, how to get the rigth gpt.ini?

At this point I am far enough to have generated the actual GPO and I just have to update the gpt.ini but I dont know how.

2

There are 2 best solutions below

0
James Flores On BEST ANSWER

Try this:

$gpoPath = get-gpo -Name "Test - GPO" | select -ExpandProperty Path

$object = [adsi]"LDAP://$gpoPath"
$object.gPCUserExtensionNames
0
Lucano On

Ok folks. I managed to make it work. James Flores' answer helped me a lot and after figuring out, that the targeted GPO-object has to be set in any way, it all worked out. Thanks a lot.

To conclude everthing: You have to create a GPOobject with just the preference you want in Group Policy Management You find those pairs I originally asked for by plugging the stuff James Flores answered in PowerShell and replacing Test - GPO with whatever you called your GPOobject in step 1 The Rest is explained here https://sdmsoftware.com/tips-tricks/group-policy-preferences-in-the-local-gpo-yes/