diff --git a/source/DSCResources/DSC_xGroupResource/DSC_xGroupResource.psm1 b/source/DSCResources/DSC_xGroupResource/DSC_xGroupResource.psm1 index 77f526bf..5e347d0c 100644 --- a/source/DSCResources/DSC_xGroupResource/DSC_xGroupResource.psm1 +++ b/source/DSCResources/DSC_xGroupResource/DSC_xGroupResource.psm1 @@ -830,9 +830,9 @@ function Set-TargetResourceOnFullSKU if ($needsRename) { - $dirEntry = [System.DirectoryServices.DirectoryEntry]($group.GetUnderlyingObject()) - $dirEntry.Rename($newName); - $dirEntry.CommitChanges(); + $dirEntry = $group.GetUnderlyingObject() + $dirEntry.Rename($newName) + $dirEntry.CommitChanges() } # Send an operation success verbose message.