Edit

Share via


Get-ClusterLog

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

Syntax

Default (Default)

Get-ClusterLog
    [[-Node] <StringCollection>]
    [-Destination <String>]
    [-TimeSpan <UInt32>]
    [-UseLocalTime]
    [-SkipClusterState]
    [-Health]
    [-InputObject <PSObject>]
    [-Cluster <String>]
    [<CommonParameters>]

Description

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.

Note: This cmdlet cannot be run remotely without Credential Security Service Provider (CredSSP) authentication on the server computer.

Examples

Example 1: Create a log file for the local cluster

Get-ClusterLog

This command creates a log file for the local cluster in the cluster reports folder C:\Windows\Cluster\Reports on each node of the cluster.

Example 2: Create log files for each node and save them locally

Get-ClusterLog -Destination .

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

Example 3: Create a log file for the local cluster for previous five minutes

Get-ClusterLog -TimeSpan 5

This command creates a log file for the local cluster in the cluster reports folder C:\Windows\Cluster\Reports on each node of the cluster. The log covers the last 5 minutes.

Parameters

-Cluster

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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Destination

Specifies the location to which to copy one or more cluster logs. To copy to the current folder, use . for this parameter input. Default location is C:\Windows\Cluster\Reports.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Health

Indicates that the cmdlet also logs the health information of the cluster.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Specifies the cluster from which to generate cluster logs.

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Node

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

Parameter properties

Type:StringCollection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SkipClusterState

Indicates that the cmdlet doesn't add additional cluster state information to the cluster logs.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:scs

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TimeSpan

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

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Span

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UseLocalTime

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:lt

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.FailoverClusters.PowerShell.Cluster

Outputs

FileInfo