adding contact object DN to Managedby attribute of a group

Dipronil Dey 20 Reputation points


I am getting an error while adding a contact object DN to Managedby parameter of a group via powershell. I am doing the same with an user DN, it works fine, but in case of contact object, getting error as "set-adgroup -Identity 'TestGroup' -ManagedBy "CN=TestContact,OU=Contacts,OU=Business,DC=ultradey26,DC=club"

set-adgroup : Identity info provided in the extended attribute: 'ManagedBy' could not be resolved. Reason: 'Cannot find an object with identity:

'CN=TestContact,OU=Contacts,OU=Business,DC=ultradey26,DC=club' under: 'DC=ultradey26,DC=club'.'.

At line:1 char:1"

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,204 questions
{count} votes

Accepted answer
  1. Daisy Zhou 20,956 Reputation points Microsoft Vendor


    Thank you for posting in Q&A forum.

    After running the command below, I get the same error.

    Set-ADGroup -Identity "TestGroup" -ManagedBy (Get-ADObject -Filter { Name -eq "TsetC" } | Select-Object -ExpandProperty DistinguishedName)

    User's image

    After running the command below:

    Set-ADGroup -Identity "CN=TestGroup,OU=OU1,DC=a,DC=com" -ManagedBy (Get-ADObject -Filter {Name -eq "CN=TsetC,OU=OU1,DC=a,DC=com" -and ObjectClass -eq "Contact"} | Select-Object -ExpandProperty DistinguishedName)

    User's image

    There is no error, but the setting is not added successfully.

    User's image

    From the link below, I understand the ManagedBy should be user or user group.

    User's image

    I hope the information above is helpful.

    If you have any questions or concerns, please feel free to let us know.

    Best Regards,

    Daisy Zhou


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

0 additional answers

Sort by: Most helpful