Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Get-ClusterLog

Updated: August 15, 2012

Applies To: Windows Server 2012

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.

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
Mode                LastWriteTime     Length Name 
----                -------------     ------ ---- 
-a---          9/4/2008   3:53 PM    2211301 Cluster.log 
-a---          9/4/2008   3:53 PM    1261025 Cluster.log 

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

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
Mode                LastWriteTime     Length Name 
----                -------------     ------ ---- 
-a---          9/4/2008   3:58 PM     128299 Cluster.log 
-a---          9/4/2008   4:01 PM     104181 Cluster.log 

Related topics

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.