Get-ClusterLog

Get-ClusterLog

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

Syntax

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

Detailed 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.

Parameters

-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

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-InputObject<PSObject>

Specifies the cluster from which to generate cluster logs.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Node<StringCollection>

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

Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TimeSpan<UInt32>

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

Aliases

span

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Microsoft.FailoverClusters.PowerShell.Cluster

Outputs

The output type is the type of the objects that the cmdlet emits.

  • System.IO.FileInfo

Examples

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