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>]
Detaillierte Beschreibung
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.
Parameter
-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.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
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.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-InputObject<PSObject>
Specifies the cluster from which to generate cluster logs.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
true (ByValue) |
Platzhalterzeichen akzeptieren? |
false |
-Node<StringCollection>
Specifies the name of the cluster node for which to generate the cluster log.
Aliase |
none |
Erforderlich? |
false |
Position? |
1 |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-TimeSpan<UInt32>
Specifies the time span for which to generate the cluster log.
Aliase |
span |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-UseLocalTime
Specifies that the time stamp for each cluster log entry uses local time. By default, the timestamp uses Greenwich Mean Time (GMT).
Aliase |
lt |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
<CommonParameters>
Dieses Cmdlet unterstützt die allgemeinen Parameter: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer und -OutVariable. Weitere Informationen finden Sie unter about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Eingaben
Der Eingabetyp ist der Typ der Objekte, die Sie per Piping an das Cmdlet übergeben können.
- Microsoft.FailoverClusters.PowerShell.Cluster
Ausgaben
Der Ausgabetyp ist der Typ der Objekte, die vom Cmdlet ausgegeben werden.
- System.IO.FileInfo
Beispiele
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