Skip Ribbon Commands
Skip to main content

How can I calculate the number of required Archive licenses?

Last Update: 2/7/2017 8:28 AM

​How can I calculate the number of required Archive licenses?

 

Note: This script was tested on Exchange 2010/2013/2016 and Exchange Online

Answer: 

 

When migrating from an Archive mailbox, BitTitan has a limit of 10GB per user per license. KB004845

To get an accurate value of the licenses required, you can run the PowerShell script below.

Note: If the query is against Exchange Online, connect first to the Exchange Online PowerShell module using:

$Cred = Get-Credential
$Session = New-PSSession -ConnectionUri https://ps.outlook.com/powerShell -Authentication Basic -AllowRedirection -ConfigurationName Microsoft.Exchange -Credential $Cred
Import-PsSession -Session $Session

On the same PowerShell window that you run the script above -- or if you are running the script On-Premises, open an Exchange Management Shell (EMS) and then -- execute:

$csvFile = "C:\LOCAL\ArchiveLicenses.CSV"
$ArchiveMailboxes = Get-Mailbox -ResultSize Unlimited -Archive
$Output = @()
Foreach( $Archive in $ArchiveMailboxes )
{
Write-Host "Processing: $($Archive.Id)"
$Output += Get-MailboxStatistics -Archive $Archive.Id | Select-Object DisplayName,ItemCount,TotalItemSize,@{Name="Licenses";Expression={[math]::Round(($_.TotalItemSize.ToString().Split("(")[1].Split(" ")[0].Replace(",","")/10GB+1),0)}}
}
Write-Host "Creating file: '$csvFile'" -ForegroundColor Green
$Output | Out-File $csvFile -Append
$TotalArchiveMailboxes = ($Output.Licenses | Measure-Object -Sum).Count
$TotalLicensesRequired = ($Output.Licenses | Measure-Object -Sum).Sum
Write-Host "`nTotal number of users that have archive: $TotalArchiveMailboxes`nTotal number of required licenses: $TotalLicensesRequired" -BackgroundColor DarkGreen -ForegroundColor White