Get-ClusterLog
Get-ClusterLog
Creates a log file for all nodes, or a specific a node, in a failover cluster.
Sintaxis
Parameter Set: InputObject
Get-ClusterLog [[-Node] <StringCollection> ] [-Cluster <String> ] [-Destination <String> ] [-InputObject <PSObject> ] [-TimeSpan <UInt32> ] [-UseLocalTime] [ <CommonParameters>]
Descripción detallada
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: Este cmdlet no se puede ejecutar de forma remota sin la autenticación del proveedor de servicio de seguridad de credenciales (CredSSP) en el equipo servidor.
Parámetros
-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.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
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.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-InputObject<PSObject>
Specifies the cluster from which to generate cluster logs.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
true (ByValue) |
¿Aceptar caracteres comodín? |
false |
-Node<StringCollection>
Specifies the name of the cluster node for which to generate the cluster log.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
1 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-TimeSpan<UInt32>
Specifies the time span for which to generate the cluster log.
Alias |
span |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-UseLocalTime
Specifies that the time stamp for each cluster log entry uses local time. By default, the timestamp uses Greenwich Mean Time (GMT).
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
<CommonParameters>
Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Entradas
El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.
- Microsoft.FailoverClusters.PowerShell.Cluster
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
- System.IO.FileInfo
Ejemplos
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