Hi All
I am trying to update AD User Accounts with Managers created on contact cards. I am having a problem where I cant seem to be able to use contact type instead of User. In AD&C it allows me to change the object type to include contacts. But I cant see how to do it in powershell.
This is the error code im getting
set-aduser : Identity info provided in the extended attribute: 'Manager' could not be resolved. Reason: 'Cannot find an object with identity: 'CN=Joe Bloggs,CN=Users,DC=domain,DC=net' under: 'DC=domain,DC=net'.'.
At line:1 char:1
+ set-aduser -Identity ADGroup1 -Manager "CN=Joe Bloggs,CN=Users,DC=computer ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (DGroup1:ADUser) [Set-ADUser], ADIdentityResolutionException
+ FullyQualifiedErrorId : ActiveDirectoryCmdlet:Microsoft.ActiveDirectory.Management.ADIdentityResolutionException,Microsoft.ActiveDirectory.Management.Commands.SetADUser
I dont have much so far as im stuck. Please help
Get-ADObject-LDAPFilter“objectClass=Contact”
set-aduser-Identity$ADUser.name-Manager$row.managerdistinguishedname-Description$row.description
this is the contents of $row
Group Name Owner managerdistinguishedname description
ADGROUP1 Joe Bloggs CN=Joe Bloggs,CN=Users,DC=Domain,DC=net Testing