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
Solved

Exchange 2007 sp1 cmdlet

Posted on 2009-05-08
1
751 Views
Last Modified: 2012-05-06
i use the below command to take backup from exchange management shell
Get-Mailbox  -Database 'mbx\BusinessSG1\example2' | Export-Mailbox -excludeFolders '\deleted items','\Junk E-mail' -pstfolderpath E:\Backup\BS2 -confirm:$false

this cmdlets saves the mailbox backup in form of AlaisName.pst.
But There are few conflicts in alias names as we have couple of domain configured on same
exchange server.

Question.
Is there a way i can fetch the User Principal Name from Get-mailbox cmdlet of all mailbox users and then pass it on to export-mailbox command and then it can save it in format      UPN.pst
0
Comment
Question by:Raman_Goswami
1 Comment
 
LVL 49

Accepted Solution

by:
Akhater earned 500 total points
ID: 24347523
well that shouldn't be hard to do but you will have to do some tests


from the top of my head try this but it should be close


Get-Mailbox  -Database 'mbx\BusinessSG1\example2'| foreach { $PSTPath = "E:\Backup\BS2\" + $_.UserPrincipalName +".pst"; Export-Mailbox -excludeFolders '\deleted items','\Junk E-mail' -pstfolderpath $PSTPath -confirm:$false}

Open in new window

0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

860 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