Solved

Set employeeID on Contact

Posted on 2014-11-14
3
217 Views
Last Modified: 2014-11-14
Hello,

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

Thanks,
JJ
0
Comment
Question by:Jamie McKillop
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 35

Expert Comment

by:Joseph Daly
ID: 40442696
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'}
0
 
LVL 35

Accepted Solution

by:
Joseph Daly earned 500 total points
ID: 40442704
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
0
 
LVL 37

Author Comment

by:Jamie McKillop
ID: 40442709
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
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will help you understand what HashTables are and how to use them in PowerShell.
A procedure for exporting installed hotfix details of remote computers using powershell
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question