Get-ClusterLog

Get-ClusterLog

Creates a log file for all nodes, or a specific a node, in a failover cluster.

構文

Parameter Set: InputObject
Get-ClusterLog [[-Node] <StringCollection> ] [-Cluster <String> ] [-Destination <String> ] [-InputObject <PSObject> ] [-TimeSpan <UInt32> ] [-UseLocalTime] [ <CommonParameters>]

詳細説明

The Get-ClusterLog cmdlet creates a log file for all nodes, or a specific a node, in a failover cluster.

When creating a log file for the cluster, you can specify the timespan that you want logged information for in addition to providing a destination for the created logs.

パラメーター

-Cluster<String>

Specifies the name of the cluster on which to run this cmdlet. If the input for this parameter is . or it is omitted, then the cmdlet runs on the local cluster.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-Destination<String>

Specifies the location to which to copy one or more cluster logs. To copy to the current folder, use . for this parameter input.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-InputObject<PSObject>

Specifies the cluster from which to generate cluster logs.

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

true (ByValue)

ワイルドカード文字の受け入れ

false

-Node<StringCollection>

Specifies the name of the cluster node for which to generate the cluster log.

Aliases

none

必須/オプション

false

位置

1

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-TimeSpan<UInt32>

Specifies the time span for which to generate the cluster log.

Aliases

span

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-UseLocalTime

Specifies that the time stamp for each cluster log entry uses local time. By default, the timestamp uses Greenwich Mean Time (GMT).

Aliases

lt

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

<CommonParameters>

このコマンドレットは共通のパラメーターをサポートしています(-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、および -OutVariable)。詳細については、TechNet の「 「about_CommonParameters」 (https://go.microsoft.com/fwlink/p/?LinkID=113216) を参照してください。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

  • Microsoft.FailoverClusters.PowerShell.Cluster

出力

出力型は、コマンドレットが出力するオブジェクトの型です。

  • System.IO.FileInfo

使用例

EXAMPLE 1

This example creates a log file for the local cluster in the cluster reports folder on each node of the cluster.

PS C:\> Get-ClusterLog

EXAMPLE 2

This example creates a log file for each node of the local cluster, and copies all logs to the local folder.

PS C:\> Get-ClusterLog -Destination .

EXAMPLE 3

This example creates a log file for the local cluster in the cluster reports folder on each node of the cluster. The log covers the last 5 minutes.

PS C:\> Get-ClusterLog -TimeSpan 5

関連項目

Set-ClusterLog