Solved

Set employeeID on Contact

Posted on 2014-11-14
3
177 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
  • 2
3 Comments
 
LVL 35

Expert Comment

by:Joseph Daly
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this previous article (https://oddytee.wordpress.com/2016/05/05/provision-new-office-365-user-and-mailbox-from-exchange-hybrid-via-powershell/), we made basic license assignments to users in O365. When I say basic, the method is the simplest way …
This article will help you understand what HashTables are and how to use them in PowerShell.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now