Share via


Get-ClusterLog

Get-ClusterLog

Create a log file for all nodes (or a specific a node) in a failover cluster.

Syntax

Get-ClusterLog [-InputObject <psobject>] [[-Node] <StringCollection>] [-Cluster <string>] [-Destination <string>] [-TimeSpan <UInt32>] [<CommonParameters>]
  • InputObject

  • Node

  • Cluster

  • Destination

  • TimeSpan

Detailed Description

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.

Parameters

Cluster

Specifies the name of the cluster to run this cmdlet on. If you type "-Cluster ." or omit the parameter, the cmdlet runs on the local cluster.

Default Value: **

Data Type: string

Attributes

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

named

position

Value Attributes

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

Destination

Specifies the location to copy the cluster log(s) to. To copy to the current folder use "-Destination ." for this parameter.

Default Value: **

Data Type: string

Attributes

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

named

position

Value Attributes

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

InputObject

Specifies the cluster to generate cluster logs from.

Default Value: **

Data Type: psobject

Attributes

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

true (ByValue)

pipelineInput

Position?

named

position

Value Attributes

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

Node

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

Default Value: **

Data Type: StringCollection

Attributes

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

1

position

Value Attributes

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

TimeSpan

Specifies the time span to generate the cluster log for. [Alias: span]

Default Value: **

Data Type: UInt32

Attributes

Name Value PSMAML Attribute

Required?

false

required

Variable Length?

false

variableLength

Accept wildcard characters?

false

globbing

Accept Pipeline Input?

false

pipelineInput

Position?

named

position

Value Attributes

Name Value PSMAML Attribute

Required?

true

required

Variable Length?

false

variableLength

Input Type

Microsoft.FailoverClusters.PowerShell.Cluster

Return Type

System.IO.FileInfo

Examples

-------------------------- EXAMPLE 1 --------------------------

Command Prompt: C:\PS>

 
Get-ClusterLog 
 
Mode                LastWriteTime     Length Name 
----                -------------     ------ ---- 
-a---          9/4/2008   3:53 PM    2211301 Cluster.log 
-a---          9/4/2008   3:53 PM    1261025 Cluster.log

Description

-----------

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

 

-------------------------- EXAMPLE 2 --------------------------

Command Prompt: C:\PS>

 
Get-ClusterLog -Destination . 
 
Mode                LastWriteTime     Length Name 
----                -------------     ------ ---- 
-a---          9/4/2008   3:55 PM    2211301 node1_cluster.log 
-a---          9/4/2008   3:55 PM    1261025 node2_cluster.log

Description

-----------

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

 

-------------------------- EXAMPLE 3 --------------------------

Command Prompt: C:\PS>

 
Get-ClusterLog -TimeSpan 5 
 
Mode                LastWriteTime     Length Name 
----                -------------     ------ ---- 
-a---          9/4/2008   3:58 PM     128299 Cluster.log 
-a---          9/4/2008   3:58 PM     104181 Cluster.log

Description

-----------

This command 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.

See Also

Reference

Set-ClusterLog

Other Resources

Online version: