title: Get Property guid
body: <p>This is the context: I'm trying to set a bunch of properties to the group "Authenticated Users". For that, I've written the following script: </p>
  
  <pre><code># GETTING AUTHENTICATED USERS SID
  $sid1 = "S-1-5-11"
  $objSID1 = New-Object System.Security.Principal.SecurityIdentifier($sid1)
  
  # GETTING AUTHENTICATED ACL
  $acl = Get-Acl -Path "AD:DC=*****,DC=*****"
  
  # CREATING RULE ATTTIBUTES
  $objectGuid = New-Object Guid 5f332e20-9eaa-48e7-b8c4-f4431fef859a 
  $identity = [System.Security.Principal.IdentityReference] $objSID1
  $adRights = [System.DirectoryServices.ActiveDirectoryRights] "ReadProperty,WriteProperty"
  $type = [System.Security.AccessControl.AccessControlType] "Allow"
  $inheritanceType = [System.DirectoryServices.ActiveDirectorySecurityInheritance] "Descendents"
  $inheritedobjectguid = New-Object Guid bf967aba-0de6-11d0-a285-00aa003049e2
  
  # CREATING THE NEW RULE
  $ace = New-Object System.DirectoryServices.ActiveDirectoryAccessRule $identity, $adRights, $type, $objectGuid, $inheritanceType, $inheritedobjectguid
  
  # SETTING THE NEW RULE
  $acl.AddAccessRule($ace)
  Set-Acl -AclObject $acl "AD:DC=*****,DC=*****"
  </code></pre>
  
  <p>And the final result should be this:</p>
  
  <p><a href="https://i.stack.imgur.com/lyd7S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lyd7S.png" alt="Part One"></a></p>
  
  <p><a href="https://i.stack.imgur.com/3ikL7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3ikL7.png" alt="Part Two"></a></p>
  
  <p>One important thing is that what I'm trying to set, as can be seen in the second image, is a <strong>property</strong> and not a <strong>permission</strong>. And that property doesn't have the same GUID in all the computers because I create it with another script before this one.</p>
  
  <p>The question is the following:</p>
  
  <p>In the code where I set <code>$objectGuid</code> variable I've hardcoded the GUID I need. What I need to know is if there is any way to get the GUID of the property using PowerShell.</p>