Set employeeID on Contact

Jamie McKillop
Jamie McKillop used Ask the Experts™
on
Hello,

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

Thanks,
JJ
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
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'}
Actually nevermind it looks like you can do this with the MS AD tools.

Get-adobject {object} | set-adobject -Add @{employeeID='333333333333'}


http://technet.microsoft.com/en-us/library/ee617254.aspx

Author

Commented:
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

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial