@@ -5359,15 +5359,15 @@ function Get-NetGroupMember {
5359
5359
if ($Recurse -and $UseMatchingRule ) {
5360
5360
# resolve the group to a distinguishedname
5361
5361
if ($GroupName ) {
5362
- $Group = Get-NetGroup - GroupName $GroupName - Domain $TargetDomain - DomainController $TargetDomainController - Credential $Credential - FullData - PageSize $PageSize
5362
+ $Group = Get-NetGroup - AllTypes - GroupName $GroupName - Domain $TargetDomain - DomainController $TargetDomainController - Credential $Credential - FullData - PageSize $PageSize
5363
5363
}
5364
5364
elseif ($SID ) {
5365
- $Group = Get-NetGroup - SID $SID - Domain $TargetDomain - DomainController $TargetDomainController - Credential $Credential - FullData - PageSize $PageSize
5365
+ $Group = Get-NetGroup - AllTypes - SID $SID - Domain $TargetDomain - DomainController $TargetDomainController - Credential $Credential - FullData - PageSize $PageSize
5366
5366
}
5367
5367
else {
5368
5368
# default to domain admins
5369
5369
$SID = (Get-DomainSID - Domain $TargetDomain - DomainController $TargetDomainController ) + " -512"
5370
- $Group = Get-NetGroup - SID $SID - Domain $TargetDomain - DomainController $TargetDomainController - Credential $Credential - FullData - PageSize $PageSize
5370
+ $Group = Get-NetGroup - AllTypes - SID $SID - Domain $TargetDomain - DomainController $TargetDomainController - Credential $Credential - FullData - PageSize $PageSize
5371
5371
}
5372
5372
$GroupDN = $Group.distinguishedname
5373
5373
$GroupFoundName = $Group.samaccountname
@@ -13056,7 +13056,7 @@ function Find-ManagedSecurityGroups {
13056
13056
#>
13057
13057
13058
13058
# Go through the list of security groups on the domain and identify those who have a manager
13059
- Get-NetGroup - FullData - Filter ' (&( managedBy=*)(groupType:1.2.840.113556.1.4.803:=2147483648) )' | Select-Object - Unique distinguishedName, managedBy, cn | ForEach-Object {
13059
+ Get-NetGroup - FullData - Filter ' (managedBy=*)' | Select-Object - Unique distinguishedName, managedBy, cn | ForEach-Object {
13060
13060
13061
13061
# Retrieve the object that the managedBy DN refers to
13062
13062
$group_manager = Get-ADObject - ADSPath $_.managedBy | Select-Object cn, distinguishedname, name, samaccounttype, samaccountname
0 commit comments