@@ -8751,11 +8751,12 @@ Switch. Return users with '(adminCount=1)' (meaning are/were privileged).
87518751.PARAMETER GroupScope
87528752
87538753Specifies the scope (DomainLocal, Global, or Universal) of the group(s) to search for.
8754+ Also accepts NotDomainLocal, NotGloba, and NotUniversal as negations.
87548755
87558756.PARAMETER GroupProperty
87568757
87578758Specifies 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 .
87598760
87608761.PARAMETER Domain
87618762
@@ -8919,12 +8920,12 @@ Custom PSObject with translated group property fields.
89198920 [Switch]
89208921 $AdminCount,
89218922
8922- [ValidateSet('DomainLocal', 'Global', 'Universal')]
8923+ [ValidateSet('DomainLocal', 'NotDomainLocal', ' Global', 'NotGlobal', ' Universal', 'NotUniversal ')]
89238924 [Alias('Scope')]
89248925 [String]
89258926 $GroupScope,
89268927
8927- [ValidateSet('Security', 'Distribution', 'CreatedBySystem')]
8928+ [ValidateSet('Security', 'Distribution', 'CreatedBySystem', 'NotCreatedBySystem' )]
89288929 [String]
89298930 $GroupProperty,
89308931
@@ -9075,18 +9076,22 @@ Custom PSObject with translated group property fields.
90759076 if ($PSBoundParameters['GroupScope']) {
90769077 $GroupScopeValue = $PSBoundParameters['GroupScope']
90779078 $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))' }
90819085 }
90829086 Write-Verbose "[Get-DomainGroup] Searching for group scope '$GroupScopeValue'"
90839087 }
90849088 if ($PSBoundParameters['GroupProperty']) {
90859089 $GroupPropertyValue = $PSBoundParameters['GroupProperty']
90869090 $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))' }
90909095 }
90919096 Write-Verbose "[Get-DomainGroup] Searching for group property '$GroupPropertyValue'"
90929097 }
0 commit comments