test.ps1
Param ( [string]$DomainDnsName='ad.greycorbel.com' ) Import-Module .\S.DS.P.psd1 -Force $conn=Get-LdapConnection -LdapServer $DomainDnsName $dse = Get-RootDSE -LdapConnection $conn $ctrl = new-object System.DirectoryServices.Protocols.SecurityDescriptorFlagControl('Dacl') #Find-LdapObject -LdapConnection $conn -searchFilter 'objectClass=user' -searchBase $dse.defaultNamingContext -PropertiesToLoad @('cn','prdel','ntSecurityDescriptor','tokenGroups') -BinaryProperties @('tokenGroups','ntSecurityDescriptor') -AdditionalControls $ctrl -RangeSize 0 Find-LdapObject -LdapConnection $conn -searchFilter 'objectClass=user' -searchBase $dse.defaultNamingContext -RangeSize 0 |