Solved

Powershell Exchange Script

Posted on 2014-02-28
4
281 Views
Last Modified: 2014-02-28
Hi Experts,

I have the following code:

Export-Mailbox –Identity "Mail" -PSTFolderPath C:\Mail\mail.user -Confirm:$false

Open in new window


I would like to add the creation date to the pst file that is created. Is this possible? Any help will be appreciated.

Regards,

introlux
0
Comment
Question by:introlux
  • 3
4 Comments
 
LVL 35

Accepted Solution

by:
Joseph Daly earned 500 total points
ID: 39895146
Should be able to do this.

$Today= Get-Date -format M-d-yyyy
Export-Mailbox –Identity "Mail" -PSTFolderPath C:\Mail\mail.user-$today -Confirm:$false
0
 

Author Comment

by:introlux
ID: 39895185
That will work but what if it is run the same day? this will overwrite the file. How can we timestamp this too?
0
 

Author Comment

by:introlux
ID: 39895204
$now = [datetime]::now.ToString('dd-MM-yyyy-HHMM')
0
 

Author Closing Comment

by:introlux
ID: 39895207
Thanks!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
In this video we show how to create a Contact 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 Recipients >> Contact ta…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

707 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

18 Experts available now in Live!

Get 1:1 Help Now