Solved

Powershell Exchange Script

Posted on 2014-02-28
4
288 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
In this video we show how to create an Address List 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 Organization >> Ad…
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…

786 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