Install .NET3 Windows 2012 R2

[ESX OS Datastore] ISO/Windows Server 2012 R2 VL (x64) – DVD (English)/en_windows_server_2012_r2_vl_x64_dvd_2979250.iso

Install-WindowsFeature Net-Framework-Core -Source d:\sources\sxs



Exchange 2010 DB one-liner

Get Dumpster Size
Get-Mailboxstatistics <Mailbox Alias> |fl *size*
get-mailboxstatistics <Mailbox Alias>| select displayname, {$_.TotalItemSize.Value.ToMB()}, TotalDeletedItemSize, database

Remove Dumpster or Recoverable Items from the User mailbox
Search-Mailbox -Identity “Mailbox Alias” -SearchDumpsterOnly -DeleteContent

Display available whitespace that can be recovered.
Get-MailboxDatabase <Mailbox Alias> -Status | FL AvailableNewMailboxSpace
Get-MailboxDatabase <Mailbox Alias> -Status | ft name,databasesize,availablenewmailboxspace -auto (Remove <Mailbox Alias> ti show all DB’s)

Offline DEFRAG of Database ******Important!!!! Do not use this for DB in DAG!!!”

Total disk space required is (databasesize-availablenewmailboxspace) x 1.1
Navigate to folder containing the DB,

Dismount-Database <MailboxDatabase>
eseutil /d <MailboxDatabase>.edb /t\testserverdefragtemp.edb
Mount-Database <MailboxDatabase>

Get primary and secondary mail address

Get-Mailbox -ResultSize Unlimited |Select-Object DisplayName,ServerName,PrimarySmtpAddress, @{Name=“EmailAddresses”;Expression={$_.EmailAddresses |Where-Object {$_.PrefixString -ceq “smtp”} | ForEach-Object {$_.SmtpAddress}}} | Export-Csv E:\mailid.csv –NoTypeInformation



*The Primary SMTP address has a PrefixString of “SMTP” all others are a lower case “smtp”

Display Issue Warning Quota, Prohibit Send Quota & Prohibit Send Receive Quota in MB or GB with label

Get-MailboxDatabase | select-object Name,@{label=”IssueWarningQuota(MB)”;expression={$_.IssueWarningQuota.Value.ToMB()}},@{label=”Prohibit Send Quota(MB)”;expression={$_.ProhibitSendQuota.Value.ToMB()}},@{label=”Prohibit Send ReceiveQuota(MB)”;expression={$_.ProhibitSendReceiveQuota.Value.ToMB()}} |Export-Csv -Path E:\DBQuota.csv