@@ -8751,11 +8751,12 @@ Switch. Return users with '(adminCount=1)' (meaning are/were privileged).
8751
8751
.PARAMETER GroupScope
8752
8752
8753
8753
Specifies the scope (DomainLocal, Global, or Universal) of the group(s) to search for.
8754
+ Also accepts NotDomainLocal, NotGloba, and NotUniversal as negations.
8754
8755
8755
8756
.PARAMETER GroupProperty
8756
8757
8757
8758
Specifies a specific property to search for when performing the group search.
8758
- Possible values are Security, Distribution, and CreatedBySystem .
8759
+ Possible values are Security, Distribution, CreatedBySystem, and NotCreatedBySystem .
8759
8760
8760
8761
.PARAMETER Domain
8761
8762
@@ -8919,12 +8920,12 @@ Custom PSObject with translated group property fields.
8919
8920
[Switch]
8920
8921
$AdminCount,
8921
8922
8922
- [ValidateSet('DomainLocal', 'Global', 'Universal')]
8923
+ [ValidateSet('DomainLocal', 'NotDomainLocal', ' Global', 'NotGlobal', ' Universal', 'NotUniversal ')]
8923
8924
[Alias('Scope')]
8924
8925
[String]
8925
8926
$GroupScope,
8926
8927
8927
- [ValidateSet('Security', 'Distribution', 'CreatedBySystem')]
8928
+ [ValidateSet('Security', 'Distribution', 'CreatedBySystem', 'NotCreatedBySystem' )]
8928
8929
[String]
8929
8930
$GroupProperty,
8930
8931
@@ -9075,18 +9076,22 @@ Custom PSObject with translated group property fields.
9075
9076
if ($PSBoundParameters['GroupScope']) {
9076
9077
$GroupScopeValue = $PSBoundParameters['GroupScope']
9077
9078
$Filter = Switch ($GroupScopeValue) {
9078
- 'DomainLocal' { '(groupType:1.2.840.113556.1.4.803:=4)' }
9079
- 'Global' { '(groupType:1.2.840.113556.1.4.803:=2)' }
9080
- 'Universal' { '(groupType:1.2.840.113556.1.4.803:=8)' }
9079
+ 'DomainLocal' { '(groupType:1.2.840.113556.1.4.803:=4)' }
9080
+ 'NotDomainLocal' { '(!(groupType:1.2.840.113556.1.4.803:=4))' }
9081
+ 'Global' { '(groupType:1.2.840.113556.1.4.803:=2)' }
9082
+ 'NotGlobal' { '(!(groupType:1.2.840.113556.1.4.803:=2))' }
9083
+ 'Universal' { '(groupType:1.2.840.113556.1.4.803:=8)' }
9084
+ 'NotUniversal' { '(!(groupType:1.2.840.113556.1.4.803:=8))' }
9081
9085
}
9082
9086
Write-Verbose "[Get-DomainGroup] Searching for group scope '$GroupScopeValue'"
9083
9087
}
9084
9088
if ($PSBoundParameters['GroupProperty']) {
9085
9089
$GroupPropertyValue = $PSBoundParameters['GroupProperty']
9086
9090
$Filter = Switch ($GroupPropertyValue) {
9087
- 'Security' { '(groupType:1.2.840.113556.1.4.803:=2147483648)' }
9088
- 'Distribution' { '(!(groupType:1.2.840.113556.1.4.803:=2147483648))' }
9089
- 'CreatedBySystem' { '(groupType:1.2.840.113556.1.4.803:=1)' }
9091
+ 'Security' { '(groupType:1.2.840.113556.1.4.803:=2147483648)' }
9092
+ 'Distribution' { '(!(groupType:1.2.840.113556.1.4.803:=2147483648))' }
9093
+ 'CreatedBySystem' { '(groupType:1.2.840.113556.1.4.803:=1)' }
9094
+ 'NotCreatedBySystem' { '(!(groupType:1.2.840.113556.1.4.803:=1))' }
9090
9095
}
9091
9096
Write-Verbose "[Get-DomainGroup] Searching for group property '$GroupPropertyValue'"
9092
9097
}
0 commit comments