This cmdlet retrieves the event log in CSV format and appends the log to a local file. You can use this cmdlet to back up the event log periodically to avoid event log loss.

Note: You cannot pipe objects to this cmdlet.


Get-LXCAEvent [-Connection LXCAConnection] 
               -Type String
               -StartSequenceNumber Long
               -Count Int
               -FileName String


-Connection LXCAConnection
Specifies the connection to the Lenovo XClarity Administrator server. If no connection is specified, the result from the last Connect-LXCA cmdlet is used.
-Type String
Specifies the event type. You can specify one of the following event types:
  • All
  • AuditLog
  • EventLog
-StartSequenceNumber Long
Specifies the starting event sequence number.
-Count Int
Specifies the number of events to be returned from the starting sequence number.
-FileName String
Specifies the file name to which the events are to be appended.
If specified, the CSV header is not saved to the local file.
This cmdlet supports the following common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable, -OutBuffer, -PipelineVariable, -OutVariable. For detailed information about each common parameter, see the Microsoft PowerShell Common Parameters webpage.


This cmdlet returns a BackupEventResult object.

Note: The BackupEventResult object has a property called NextSequenceNumber that indicates the starting sequence number that can be used for the next backup.


The following example backs up the event log to a local file every hour.

$cred = Get-Credential
Connect-LXCA -Host -Credential $cred

$backupResult = Backup-LXCAEventLog -Type All -StartSequenceNumber 0 -Count 1000 -FileName c:\LXCALog.csv
    Start-Sleep -Seconds (60*60*1)
    $backupResult = Backup-LXCAEventLog -Type All -StartSequenceNumber $backupResult.NextSequenceNumber` 
                                        -Count 1000 -FileName c:\LXCALog.csv -NoHead