Link to home
Start Free TrialLog in
Avatar of gavintham
gavintham

asked on

Delete Mailbox account and create contact Powershell

I'm running MS exchange 2007.
I'm looking for a powershell script to delete bulk mailbox and create new contact.
however the new contact should include all the mailbox information (e.g. X500, smtp address, and user information such as phone number/title/etc)
Avatar of Arjun Vyavahare
Arjun Vyavahare
Flag of India image

Hi,

To delete bulk mailboxes from Exchange 2007, refer:-

http://randomtechminutia.wordpress.com/2012/05/03/powershell-script-to-delete-exchange-mailboxes-in-mass/

To create bulk mailboxes in exchange 2007, refer:
http://blogs.technet.com/b/exchangept/archive/2007/10/04/bulk-creation-of-exchange-2007-mailboxes.aspx

I hope this will help you.

Regards,
Arjun
Avatar of gavintham
gavintham

ASKER

Hi Arjun,

Thanks for you post.

I want to replace the user mailbox with new contact.

i want to retrieve all existing user mailbox detail out then perform delete.
after deleted then will create new contact of these users with the complete information.(e.g. X500, smtp address, and user information such as phone number/title/etc)

the article that you post only single solution. hope to hear you for more help.

Thanks
Gavin
Hi,

Try to run below command and see if you can get any clue:

get-mailbox -server Server_name -resultsize unlimited | get-user | select DisplayName, Title, Manager, Department | export-csv "c:\temp\info.csv"

Regards,
Arjun
hi Arjun,

if i want to export the complete information. (LegacyDN - x500, SMTP Address, DisplayName, Title, Manager, Department)

after that i need to to add all these information into new contact.

how to combine all these thing into a script?

Thanks
Gavin
ASKER CERTIFIED SOLUTION
Avatar of gavintham
gavintham

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
full script