From f436de51ba74a730975a4e6f484e44fa41742713 Mon Sep 17 00:00:00 2001 From: Przemyslaw Klys Date: Fri, 30 Aug 2024 08:34:22 +0200 Subject: [PATCH] Fix wrong use of string --- Private/Request-ADComputersDisable.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Private/Request-ADComputersDisable.ps1 b/Private/Request-ADComputersDisable.ps1 index 095e83a..43c2bb6 100644 --- a/Private/Request-ADComputersDisable.ps1 +++ b/Private/Request-ADComputersDisable.ps1 @@ -23,8 +23,8 @@ if ($DisableAndMove -and $DisableMoveTargetOrganizationalUnit) { if ($DisableMoveTargetOrganizationalUnit -is [System.Collections.IDictionary]) { $OrganizationalUnit = $DisableMoveTargetOrganizationalUnit - } elseif ($TargetOrganizationalUnit -is [string]) { - $DomainCN = ConvertFrom-DistinguishedName -DistinguishedName $TargetOrganizationalUnit -ToDomainCN + } elseif ($DisableMoveTargetOrganizationalUnit -is [string]) { + $DomainCN = ConvertFrom-DistinguishedName -DistinguishedName $DisableMoveTargetOrganizationalUnit -ToDomainCN $OrganizationalUnit = [ordered] @{ $DomainCN = $DisableMoveTargetOrganizationalUnit }