Solved

Archive outlook 2013

Posted on 2015-01-15
3
196 Views
Last Modified: 2015-01-15
Whats the best way to archive all of outlook emails, calendar, contacts and notes to a PST?

I want to save the data for backup purposes but I cannot removed any of that data from product. So the trick is to archive everything to a PST but leave everything as well on production.
0
Comment
Question by:IT_Fanatic
3 Comments
 
LVL 8

Expert Comment

by:Tim Edwards
ID: 40551780
You will need to test as this is what I do for my 2010 environment when backing disabled users before removing. Under the Settings you will just need to input your information the OU and the ExportShare
 
###############
 # Settings #
 ###############
 
# OU Path for Users to be Archived.
 $OU = "contoso.com/users"
 
# Share to export mailboxes to. Needs R/W by Exchange Trusted Subsystem
 # Must be a UNC path as this is run by the CAS MRS service.
 $ExportShare = "UNCPath"
 
# After each run a report of the exports can be dropped into the directory specified below. (The user that runs this script needs access to this share)
# Must be a UNC path or the full path of a local directory.
 $ReportShare = "C:\Scripts\MailboxExport\Reports"
 
# Shall we remove the PST file, if it exists beforehand? (The user that runs this script needs access to the $ExportShare share)
 # Valid values: $true or $false
 $RemovePSTBeforeExport = $false
 
###############
 # Code #
 ###############
 
if ($Server)
 {
 if (!(Get-ExchangeServer $Server -ErrorAction SilentlyContinue))
 {
 throw "Exchange Server $Server not found";
 }
 if (!(Get-MailboxDatabase -Server $Server -ErrorAction SilentlyContinue))
 {
 throw "Exchange Server $Server does not have mailbox databases";
 }
 $Mailboxes = Get-Mailbox -Server $Server -ResultSize Unlimited
 } elseif ($Database) {
 if (!(Get-MailboxDatabase $Database -ErrorAction SilentlyContinue))
 {
 throw "Mailbox database $Database not found"
 }
 $Mailboxes = Get-Mailbox -Database $Database -ResultSize Unlimited
 } elseif ($OU) {
 $Mailboxes = Get-Mailbox -OrganizationalUnit $OU -ResultSize Unlimited
 }
 if (!$Mailboxes)
 {
 throw "No mailboxes found on $Server"
 }
 
 
if (!$Mailboxes.Count)
 {
 throw "This script does not support a single mailbox export."
 }
 
# Pre-checks done
 
# Make batch name
 $date=Get-Date
 $BatchName = "_Export_$($date.Year)-$($date.Month)-$($date.Day)_$($date.Hour)-$($date.Minute)-$($date.Second)"
 
Write-Output "Queuing $($Mailboxes.Count) mailboxes as batch '$($BatchName)'"
 
# Queue all mailbox export requests
 foreach ($Mailbox in $Mailboxes)
 {
 
if ($RemovePSTBeforeExport -eq $true -and (Get-Item "$($ExportShare)\$($Mailbox.Alias)$($BatchName).PST" -ErrorAction SilentlyContinue))
 {
 Remove-Item "$($ExportShare)\$($Mailbox.Alias)$($BatchName).PST" -Confirm:$false
 }
 New-MailboxExportRequest -BatchName $BatchName -Mailbox $Mailbox.Alias -FilePath "$($ExportShare)\$($Mailbox.Alias)$($BatchName).PST"
 }
 
Write-Output "Waiting for batch to complete"
 
# Wait for mailbox export requests to complete
 while ((Get-MailboxExportRequest -BatchName $BatchName | Where {$_.Status -eq "Queued" -or $_.Status -eq "InProgress"}))
 {
 
sleep 60
 }
 
# Write reports if required
 if ($ReportShare)
 {
 Write-Output "Writing reports to $($ReportShare)"
 $Completed = Get-MailboxExportRequest -BatchName $BatchName | Where {$_.Status -eq "Completed"} | Get-MailboxExportRequestStatistics | Format-List
 if ($Completed)
 {
 $Completed | Out-File -FilePath "$($ReportShare)\$($BatchName)_Completed.txt"
 }
 $Incomplete = Get-MailboxExportRequest -BatchName $BatchName | Where {$_.Status -ne "Completed"} | Get-MailboxExportRequestStatistics | Format-List
 if ($Incomplete)
 {
 $Incomplete | Out-File -FilePath "$($ReportShare)\$($BatchName)_Incomplete_Report.txt"
 }
 }
 
# Remove Requests
 Write-Output "Removing requests created as part of batch '$($BatchName)'"
 Get-MailboxExportRequest -BatchName $BatchName | Remove-MailboxExportRequest -Confirm:$false
0
 
LVL 41

Accepted Solution

by:
Amit earned 500 total points
ID: 40551783
Just got to File>Open>Import>Export to a file>Outlook Data File>Select the mailbox or folder>Click Subfolders also, if required and finally export it.
0
 

Author Closing Comment

by:IT_Fanatic
ID: 40551991
Great it worked. Thank you
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
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…

758 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

20 Experts available now in Live!

Get 1:1 Help Now