mirror of
https://github.com/EvotecIT/GPOZaurr.git
synced 2026-08-10 18:57:23 +00:00
21 lines
789 B
PowerShell
21 lines
789 B
PowerShell
function Get-GPOZaurrDuplicateObject {
|
|
[cmdletBinding()]
|
|
param(
|
|
[alias('ForestName')][string] $Forest,
|
|
[string[]] $ExcludeDomains,
|
|
[alias('Domain', 'Domains')][string[]] $IncludeDomains,
|
|
[System.Collections.IDictionary] $ExtendedForestInformation
|
|
)
|
|
|
|
$getWinADDuplicateObjectSplat = @{
|
|
Forest = $Forest
|
|
IncludeDomains = $IncludeDomains
|
|
ExcludeDomains = $ExcludeDomains
|
|
ExtendedForestInformation = $ExtendedForestInformation
|
|
PartialMatchDistinguishedName = "*,CN=Policies,CN=System,DC=*"
|
|
Extended = $true
|
|
}
|
|
|
|
$DuplicateObjects = Get-WinADDuplicateObject @getWinADDuplicateObjectSplat
|
|
$DuplicateObjects
|
|
} |