Avatar of jamorlando
jamorlandoFlag for United States of America

asked on 

Exporting AD Contacts with Powershell

Hi,
I'm currently trying to migrate our company's 1000+ mail contacts from Exchange into a contacts list in Sharepoint.

I need specific data from Active Directory for each contact which goes beyond what the Get-MailContact cmdlet can do.  I need info like Company, phone number...etc...

I downloaded Quest's tools, but it seems like their cmdlets are only for users, not contacts.

Any ideas?
Active DirectoryPowershell

Avatar of undefined
Last Comment
jamorlando
ASKER CERTIFIED SOLUTION
Avatar of KenMcF
KenMcF
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
Avatar of Joseph Daly
Joseph Daly
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
SOLUTION
Avatar of Akhater
Akhater
Flag of Lebanon image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of jamorlando
jamorlando
Flag of United States of America image

ASKER

@KenMcF, thanks, I will try to tweak this to my needs

@xxdcmast, wow, never heard of the csvde.exe command, but that's pretty sweet that you can do this kind of thing from the command prompt instead of powershell.  If I can't get Ken's solution to work I'll check this out.

@Akhater, I see company, and phone, but what about an attribute like "Address" which is stored in AD?
Avatar of Akhater
Akhater
Flag of Lebanon image

you mean StreetAddress?

get-contact -resultsize unlimited | select-object name,Phone,company,streetaddress

again try with on one conact get-contact contactname | fl  and you will be able to find all properties
Avatar of jamorlando
jamorlando
Flag of United States of America image

ASKER

Actually Ken, when I run
Get-QADObject -type contact -Identity bjones | fl

I don't see an attribute for address either.  Is there a way to do this from quest?
Avatar of Akhater
Akhater
Flag of Lebanon image

here are the address attributes in get-contact


StreetAddress
PostOfficeBox
City
StateOrProvince
PostalCode
CountryOrRegion
Avatar of KenMcF
KenMcF
Flag of United States of America image

Try it with -includedproperties *

Get-QADObject -type contact -Identity bjones -includedproperties * | fl *
Avatar of jamorlando
jamorlando
Flag of United States of America image

ASKER

Thanks ... I got this figured out.  I'm going to give you guys all credit, cause all 3 of you were very helpful.
Active Directory
Active Directory

Active Directory (AD) is a Microsoft brand for identity-related capabilities. In the on-premises world, Windows Server AD provides a set of identity capabilities and services, and is hugely popular (88% of Fortune 1000 and 95% of enterprises use AD). This topic includes all things Active Directory including DNS, Group Policy, DFS, troubleshooting, ADFS, and all other topics under the Microsoft AD and identity umbrella.

86K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo