Skip to main content
SnapCenter 4.9 cmdlets

Get-SmLogs

Contributors

Gets SnapCenter log files.

Syntax

Get-SmLogs [-Path]  <String>  [-AllLogs]  <>  [-Path]  <String>  [-ServerLogs]  <>  [-Path]  <String>  [-JobId]  <Int64>  [-Path]  <String>  [-PluginId]  <Int64>  [-Path]  <String>  [-HostName]  <String>  [-PluginCode]  <PluginCode>

Detailed Description

Gets SnapCenter log files. Log files are returned in a .zip file. You can retrieve all SnapCenter logs, or logs for a individual plug-in or SnapCenter instance. You can also get logs for a specified job.

Parameters

Name Description Required? Pipeline Input Default Value

Path

Specifies the path for the location to which you want the log .zip file to be written.

true

false

AllLogs

Indicates that you want to receive all SnapCenter logs, which include SnapCenter server, managed host, and plug-in logs.

true

false

ServerLogs

Indicates that you want to receive logs for the SnapCenter server only.

true

false

JobId

Indicates that you want to receive information for a specified job ID.

true

false

PluginId

Indicates that you want to receive information for the specified plug-in ID.

true

false

HostName

Specifies the host for the plug-in instance for which you want to retrieve logs.

false

false

PluginCode

Indicates that you want to create log settings pertaining to a specified plug-in instance. Valid plug-in values are SCSQL and SCO. For example, if you want to retrieve the SnapCenter Plug-in for Microsoft SQL Server logs, the plug-in code is SCSQL.

true

false

Examples

Example 1: Retrieving all logs

 Get-SmLogs -AllLogs -Path C:\temp\allLogs.zip

This example syntax retrieves all log files.

Example 2: Retrieving SnapCenter Server logs

 Get-SmLogs -Path C:\temp\serverLogs.zip –ServerLogs

This example syntax retrieves all Server logs.

Example 3: Retrieving plugin instance logs

 Get-SmLogs -HostName host123 -Path C:\temp\smsqlLogs.zip -PluginCode SCSQL

This example syntax retrieves all plug-in instance logs for SnapCenter Plug-in for Microsoft SQL Server.

Example 4: Retrieving logs for a designated job

 Get-SmLogs -JobId 1234 -Path C:\temp\job_1234.zip

This example syntax retrieves logs for job ID 1234.