The other Exchange 2013 tips of the day posts can be found here:
Exchange 2013 Tip Of The Day – 1 To 25
Exchange 2013 Tip Of The Day – 26 To 50
Exchange 2013 Tip Of The Day – 51 To 75
To obtain the listing below, the following command was used:
$Int = 76;While ($Int -le 100){Get-Tip $Int; Write-Host; $Int+=1}
Tip of the day #76:
To get a list of all parameters available for a cmdlet, type:
(Get-Command <Cmdlet Name>).Parameters | ft key
For example, to get all parameters for the New-TransportRule cmdlet, type:
(Get-Command New-TransportRule).Parameters | ft key
Tip of the day #77:
Did you know that you need to use the AssembleMessage script when exporting messages from a queue? For example, if you want to export the message with message ID 1234 from the contoso.com queue on server Mailbox1, you need to run the following command:
Export-Message -Identity Mailbox1\contoso.com\1234 | AssembleMessage -Path "C:\ExportedMessages\Message1234.eml"
Tip of the day #78:
Wondering how many log files are generated per server every minute? Quickly find out by typing:
Get-MailboxDatabase -Server <Mailbox Server Name> | ?{ %{$_.DatabaseCopies | ?{$_.ReplayLagTime -ne [TimeSpan]::Zero -And $_.HostServerName -eq $env:ComputerName} } } | %{ $count = 0; $MinT = [DateTime]::MaxValue; $MaxT = [DateTime]::MinValue; Get-ChildItem -Path $_.LogFolderPath -Filter "*????.log" | %{ $count = $count + 1; if($_.LastWriteTime -gt $MaxT){ $MaxT = $_.LastWriteTime}; if($_.LastWriteTime -lt $MinT){ $MinT= $_.LastWriteTime} }; ($count / ($MaxT.Subtract($MinT)).TotalMinutes) } | Measure-Object -Min -Max –Ave
Tip of the day #79:
Wondering how many log files are generated per database every minute? Quickly find out by typing:
Get-MailboxDatabase -Server <Mailbox Server Name> | %{ Get-ChildItem -Path $_.LogFolderPath -Filter "*????.log" | Group- Object -Property {$_.LastWriteTime.Day,$_.LastWriteTime.Hour,$_.LastWriteTime.minute} | ?{$_.Count -gt 1} | Measure-Object -Property Count -Min -Max -Ave }
Tip of the day #80:
Get quick health and status information for your mailbox database copies by typing:
Get-DatabaseAvailabilityGroup DAG1 | %{ $_.Servers | %{ Get-MailboxDatabaseCopyStatus -Server $_ } }
Tip of the day #81:
Did you know that you can share your calendar and contacts folders with other federated Exchange 2013 organizations by first creating a federation trust with the Microsoft Federation Gateway with a valid digital certificate? Just use the New-FederationTrust cmdlet and the certificate thumbprint to get started. Type:
New-FederationTrust -Name "Microsoft Federation Gateway" -Thumbprint <cetificate thumbprint>
Finish by setting up an organization relationship with another federated Exchange organization to share limited calendar free/busy information. Type:
Get-FederationInformation -DomainName <other domain name> | New-OrganizationRelationship -Name "<name of relationship>" -FreeBusyAccessEnabled $true -FreeBusyAccessLevel –LimitedDetails
Tip of the day #82:
Need to quickly get a list of your Exchange certificates and their thumbprints? Just use the Get-ExchangeCertificate cmdlet. Type:
Get-ExchangeCertificate | fl
Want to filter the list and include just the self-signed certificates? No problem! Type:
Get-ExchangeCertificate | where {$_.IsSelfSigned -eq $true} | fl
Tip of the day #83:
Not sure your federation trust with the Microsoft Federation Gateway is working correctly? To test if a security token can be retrieved, just type:
Test-FederationTrust
Tip of the day #84:
Need a report on the status of each Exchange certificate installed on all Mailbox and Client Access servers? Try this:
Test-FederationTrustCertificate
Tip of the day #85:
Need to verify that an organization relationship is correctly configured and functioning as expected for a user in an external Exchange organization? Just type:
Test-OrganizationRelationship -UserIdentity <user email address> -Identity <external domain> –Confirm
Tip of the day #86:
Use this command to get all active mailbox move requests on a mailbox server:
$(Get-MailboxDatabaseCopyStatus -Server MBX | ?{ $_.status -eq "Mounted" }) | %{ Get-MoveRequest -TargetDatabase $_.DatabaseName } | ?{ $_.Status -ne "Completed" -and $_.Status -ne "CompletedWithWarning" }
Tip of the day #87:
Use this command to find all non-completed move requests and group them by target database:
Get-MoveRequest | ?{ $_.Status -ne "Completed" -and $_.Status -ne "CompletedWithWarning" } | group targetdatabase | sort Count –Descending
Tip of the day #88:
Use this command to find failure messages for all failed moves:
Get-MoveRequest -MoveStatus Failed | Get-MoveRequestStatistics | ft Alias, percentcomplete, message –auto
Tip of the day #89:
Use these commands to get a snapshot of the move throughput for completed moves.
$stats = Get-MoveRequest -MoveStatus Completed | Get-MoveRequestStatistics
$stats | sort totalmailboxsize | ft Alias,{$_.totalmailboxsize.ToMB()},totalinprogressduration –auto
Tip of the day #90:
Use this command to view how many move requests are in the queue to be moved:
(Get-MoveRequest -MoveStatus Queued).count
Tip of the day #91:
Use this command to find all mailbox move requests for mailboxes on the active mailbox database copies that are hosted on the specified mailbox server. This command returns the display name, status of the move request, and the database to which the mailbox is being moved.
$(Get-MailboxDatabaseCopyStatus -Server MBX01 | ?{ $_.status -eq "Mounted" }) | %{ Get-MoveRequest -TargetDatabase $_.DatabaseName }
Tip of the day #92:
Need to see a list of the URLs for a user's calendar that has been published for Internet access? Just type:
Get-MailboxCalendarFolder -Identity <user alias>:\calendar | fl
Tip of the day #93:
Did you know that you can download and integrate the latest version of Help for all cmdlets on the local Exchange server? Type:
Update-ExchangeHelp
You need to run this command on each Exchange server to get updated Help.
Cheers,
Rhoderick