Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Exchange 2007 sp1 cmdlet

Posted on 2009-05-08
1
Medium Priority
?
780 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Are you an Exchange administrator employed with an organization? And, have you encountered a corrupt Exchange database due to which you are not able to open its EDB file. This article will explain all the steps to repair corrupt Exchange database.
There can be many situations demanding the conversion of Outlook OST files to PST format and as such, there is no shortage of automated tools to perform this conversion. However, what makes Stellar OST to PST converter stand above the rest? Let us e…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

972 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