79765316

Date: 2025-09-15 15:13:12
Score: 2
Natty:
Report link

Thanks mklement.

I know I need to put my glasses more frequently, but:

$groupSID = (Get-ADGroup -Identity "GroupName" -Properties ObjectSID).ObjectSID
$identityReference = $groupSID.Value
$readAllRule =
>>   [System.DirectoryServices.ActiveDirectoryAccessRule]::new(
>>     $identityReference,
>>     [System.DirectoryServices.ActiveDirectoryRights]::GenericRead,
>>     [System.Security.AccessControl.AccessControlType]::Allow,
>>     [System.DirectoryServices.ActiveDirectorySecurityInheritance]::Descendents,
>>     [guid]::Empty
>>   )
Cannot find an overload for "new" and the argument count: "5".
At line:1 char:1
+ $readAllRule =
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest

PS H:\Scripts\Superscript> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.17763.7671

And $IdentityReference gives the correct SID.

Running on a W2k19 server.

Thanks :-)

Luuke

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (0.5): I need
  • Contains signature (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Luuke