Link to home
Start Free TrialLog in
Avatar of Jamie McKillop
Jamie McKillopFlag for Canada

asked on

Set employeeID on Contact

Hello,

This should be simple, but I can't figure out how to retrieve or set the employeeID field on a contact.

Thanks,
JJ
Avatar of Joseph Daly
Joseph Daly
Flag of United States of America image

So this is something that I think microsoft still needs to work on in their powershell modules. I tested this with both MS AD and exchange modules and can see no easy way of updating contact with the employee id.

However if you choose to use the Quest powershell cmdlets this is pretty simple. The quest cmdlets provide the -objectattributes switch which lets you update information that may not be exposed by one of the standard switches.

get-qadobject contactname | set-qadobject -objectattributes @{employeeID='3333333333'}
ASKER CERTIFIED SOLUTION
Avatar of Joseph Daly
Joseph Daly
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jamie McKillop

ASKER

Thanks for your reply Joseph. I've also figured out how to do this with the standard AD module.

Get-ADObject -Filter 'ObjectClass -eq "contact"' | % {
	Set-ADObject $_ -Clear employeeid
}

Open in new window


I'm specifically looking to clear the field but you could also use -Add or -Replace to change values.

JJ