Skip to content

Commit

Permalink
Fix error not found for GPP
Browse files Browse the repository at this point in the history
  • Loading branch information
vreguibar committed Oct 8, 2024
1 parent ab1047b commit 2d0c75c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Public/New-CentralItOU.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@

[String]$PsoName = $confXML.n.Admin.PSOs.ItAdminsPSO.Name

$PSOexists = Get-ADFineGrainedPasswordPolicy -Filter { name -eq $PsoName }
$PSOexists = Get-ADFineGrainedPasswordPolicy -Filter { name -like $PsoName }

if (-not($PSOexists)) {
Write-Verbose -Message ('Creating {0} PSO.' -f $PsoName)
Expand All @@ -1265,7 +1265,7 @@

$PSOexists = New-ADFineGrainedPasswordPolicy @Splat
If ( -not $PSOexists ) {
$PSOexists = Get-ADFineGrainedPasswordPolicy -Filter { name -eq $PsoName }
$PSOexists = Get-ADFineGrainedPasswordPolicy -Filter { name -like $PsoName }
}

} # End If PSO exists
Expand Down Expand Up @@ -1405,7 +1405,7 @@

[String]$PsoName = $confXML.n.Admin.PSOs.ServiceAccountsPSO.Name

$PSOexists = Get-ADFineGrainedPasswordPolicy -Filter { name -eq $PsoName }
$PSOexists = Get-ADFineGrainedPasswordPolicy -Filter { name -like $PsoName }

if (-not($PSOexists)) {
Write-Verbose -Message ('Creating {0} PSO.' -f $PsoName)
Expand All @@ -1427,7 +1427,7 @@
}
$PSOexists = New-ADFineGrainedPasswordPolicy @Splat
If (-not $PSOexists) {
$PSOexists = Get-ADFineGrainedPasswordPolicy -Filter { cn -eq $PsoName }
$PSOexists = Get-ADFineGrainedPasswordPolicy -Filter { name -like $PsoName }
}

#$PSOexists = Get-ADFineGrainedPasswordPolicy -Identity $PsoName
Expand Down

0 comments on commit 2d0c75c

Please sign in to comment.