Exchange 2010 Powershell指令碼攻略(十一)
ConvertTo-MessageLatency
param(
[Microsoft.Exchange.Management.TransportLogSearchTasks.MessageTrackingEvent] $MessageTrackingEvent
)
begin
{
# PrintLatencies
function PrintLatencies
{
param(
[Microsoft.Exchange.Management.TransportLogSearchTasks.MessageTrackingEvent] $mte = $(throw "argument is mandatory")
)
# Get latency objects from the event.
$latencies = [Microsoft.Exchange.Management.TransportLogSearchTasks.MessageTrackingLatency]::GetLatencies($mte)
# Print each latency component.
foreach ($latency in $latencies)
{
$latency
}
}
# Print usage information
function Usage
{
@"
NAME
ConvertTo-MessageLatency
SYNOPSIS
ConvertTo-MessageLatency -MessageTrackingEvent MessageTrackingEvent
SHORT DESCRIPTION
The ConvertTo-MessageLatency command gets retrieves component latency details from a message tracking event.
DETAILED DESCRIPTION
Parameters:
-MessageTrackingEvent MessageTrackingEvent
[Microsoft.Exchange.Management.TransportLogSearchTasks.MessageTrackingEvent]
[pipeline input allowed]
A message tracking log event object.
---
ConvertTo-MessageLatency reads the MessageInfo, MessageLatency, and LatencyType properties
from the MessageTrackingEvent object specified and writes a collection of MessageTrackingLatency objects to the pipeline.
This command also supports the ubiquitous parameters:
-Debug (-db), -ErrorAction (-ea), -ErrorVariable (-ev), -WarningAction (-wa), -WarningVariable (-wv),
-OutputBuffer (-ob), -OutputVariable (-ov), and -Verbose (-vb)
NOTES
TBD
EXAMPLES
Get-MessageTrackingLog | ConvertTo-MessageLatency
Output: a collection of MessageTrackingLatency objects that will contain combination of message-specific properties and component latencies
Get-MessageTrackingLog -EventId:扴END?-Start:'5/4/2007 2:09:20 PM' -End:'5/4/2007 3:09:20 PM' | where {$_.MessageLatency.TotalSeconds -gt 90} | ConvertTo-MessageLatency | where {$_.ComponentCode -eq 慟D?-and $_.ComponentLatency.TotalSeconds -gt 30} | fl MessageId,ServerIp,MessageLatency,ComponentLatency
"@
}
}
process
{
# process pipelined tracking events.
if ($_ -ne $null)
{
PrintLatencies $_
}
}
end
{
# check for Usage Statement request
if (($args.Count -gt 0) -and ($args[0] -imatch "-{1,2}[?h]"))
{
# user wants the usage statement
Usage
return
}
# if a tracking event was passed in as an argument, process it.
if ($MessageTrackingEvent -ne $null)
{
PrintLatencies $MessageTrackingEvent
}
}
[@more@]來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23700676/viewspace-1052337/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Exchange 2010 Powershell指令碼攻略(十五)指令碼
- Exchange 2010 Powershell指令碼攻略(十四)指令碼
- Exchange 2010 Powershell指令碼攻略(十三)指令碼
- Exchange 2010 Powershell指令碼攻略(十二)指令碼
- Exchange 2010 Powershell指令碼攻略(十)指令碼
- Exchange 2010 Powershell指令碼攻略(九)指令碼
- Exchange 2010 Powershell指令碼攻略(八)指令碼
- Exchange 2010 Powershell指令碼攻略(七)指令碼
- Exchange 2010 Powershell指令碼攻略(六)指令碼
- Exchange 2010 Powershell指令碼攻略(五)指令碼
- Exchange 2010 Powershell指令碼攻略(四)指令碼
- Exchange 2010 Powershell指令碼攻略(三)指令碼
- Exchange 2010 Powershell指令碼攻略(二)指令碼
- Exchange 2010 Powershell指令碼攻略(一)指令碼
- powershell指令碼指令碼
- PowerShell 指令碼中的密碼指令碼密碼
- PowerShell 指令碼執行策略指令碼
- powershell重新命名指令碼指令碼
- Exchange 2010搭建
- Bash指令碼debug攻略指令碼
- 開機自啟動Powershell指令碼指令碼
- linux shell 指令碼攻略筆記Linux指令碼筆記
- 【黑客基礎】Windows PowerShell 指令碼學習(上)黑客Windows指令碼
- 最簡單的一個powershell的指令碼指令碼
- Exchange 2010需要的網路埠
- 微軟宣佈全新命令列+指令碼工具:PowerShell 7微軟命令列指令碼
- 五個實用的SQL Server PowerShell指令碼OMSQLServer指令碼
- 利用powershell指令碼Windows hosts記錄替換IP指令碼Windows
- Win10使用Powershell提示禁止執行指令碼怎麼辦 Win10使用Powershell提示禁止執行指令碼如何解決Win10指令碼
- shell指令碼攻略--DNS正向解析一鍵部署指令碼DNS
- 利用 Powershell 編寫簡單的瀏覽器指令碼瀏覽器指令碼
- 【連結】LINUX SHELL指令碼攻略筆記[速查]Linux指令碼筆記
- 《Linux Shell指令碼攻略(第2版)》書評Linux指令碼
- nuget打包檔案丟失如何使用powershell指令碼解決指令碼
- 使用VSCode遠端除錯惡意Powershell指令碼VSCode除錯指令碼
- 【VMware VCF】使用 PowerShell 指令碼管理 SDDC Manager 中的軟體包。指令碼
- PowerShell 指令碼來監控 CPU、記憶體和磁碟使用情況:指令碼記憶體
- linux shell 指令碼攻略學習6-xargs詳解Linux指令碼