diff --git a/Modules/ActiveDirectoryDsc.Common/ActiveDirectoryDsc.Common.psm1 b/Modules/ActiveDirectoryDsc.Common/ActiveDirectoryDsc.Common.psm1 index c47c10fe0..84936fe69 100644 --- a/Modules/ActiveDirectoryDsc.Common/ActiveDirectoryDsc.Common.psm1 +++ b/Modules/ActiveDirectoryDsc.Common/ActiveDirectoryDsc.Common.psm1 @@ -1498,6 +1498,14 @@ function Add-ADCommonGroupMember { $memberObject = Get-ADUser @commonParameters } + elseif ($memberObjectClass -eq 'msDS-ManagedServiceAccount') + { + $memberObject = Get-ADServiceAccount @commonParameters + } + elseif ($memberObjectClass -eq 'msDS-GroupManagedServiceAccount') + { + $memberObject = Get-ADServiceAccount @commonParameters + } Add-ADGroupMember @Parameters -Members $memberObject -ErrorAction 'Stop' }