Skip to main content

Get-LXC1Alert

This cmdlet returns a list of alerts or details for a specific alert.

Note
You cannot pipe objects to this cmdlet.

Syntax

Get-LXC1Alert  -ID String
[-Connection LXC1Connection]
[CommonParameter]

Get-LXC1Alert [-Date String[]]
[-Serviceability String[]]
[-Severity String[]]
[-Message String[]]
[-MessageSearchType String]
[-Anywhere String[]]
[-AnywhereSearchType String]
[-Connection LXC1Connection]
[CommonParameter]
Parameters
-ID String
Specifies the ID of the alert to return.
-Date String[]
Specifies the date when alerts were raised, as range using the following format: <startDate>,<endDate>. All alerts that were raised during that range are returned.

The end date is optional. If is not specified, the current date is used by default.

Note
Format the date according to the current settings of the OS from where the cmdlet is run.
-Serviceability String[]
Specifies the serviceability type. All alerts that match any of the serviceability types are returned. This can be one or more of the following values, separated by a comma.
  • none
  • serviceable
  • user
  • unknown
-Severity String[]
Specifies the alert severity. All alerts that match any of the severity types are returned. This can be one or more of the following values, separated by a comma.
  • informational
  • warning
  • critical
  • unknown
-Message String[]
Specifies one or more full or partial message titles, separated by comma. All alerts that match any of the specified patterns based on the operator (-MessageSearchType parameter) are returned.
-MessageSearchType String
Specifies the operator to use for patterns in the -Message parameter. one of the following values.
  • contains (default)
  • notContains

If -Message is not specified, this parameter is ignored.

-Anywhere String[]
Specifies one or more full or partial text found in any alert attributes, separated by a comma. All alerts that match any of the specified patterns based on the operator (-AnywhereSearchType parameter) are returned.
-AnywhereSearchType String
Specifies the operator to use for patterns in the -Anywhere parameter. This can be one of the following values.
  • contains (default)
  • notContains
  • equals
  • notEquals

If -Anywhere is not specified, this parameter is ignored.

-Connection LXC1Connection
Specifies the connection to the XClarity One server. If no connection is specified, the result from the last Connect-LXC1 cmdlet is used.
CommonParameters
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.

Results

Examples

The following example returns a list of all alerts.
param ( 
[Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] $ClientID,
[Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] $UserSecret
)

$securePassword = ConvertTo-SecureString $UserSecret -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential($ClientID, $securePassword))
$hostOnprem = "192.0.2.0"

$connection = Connect-LXC1 -PortalAddress $hostOnprem `
-Credential $cred `
-PortalType cloud `
-SkipCertificateCheck

$result = Get-LXC1Alert

$result|Format-List
The following example returns list of all alerts that are newer than specified date based on message, anywhere, severity, and serviceability.
param ( 
[Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] $ClientID,
[Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] $UserSecret
)

$securePassword = ConvertTo-SecureString $UserSecret -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential($ClientID, $securePassword))
$hostOnprem = "192.0.2.0"

$connection = Connect-LXC1 -PortalAddress $hostOnprem `
-Credential $cred `
-PortalType cloud `
-SkipCertificateCheck

$result = Get-LXC1Alert -Anywhere '192.0' `
-AnywhereSearchType notContains
-Message 'warranty','Connectivity' `
-MessageSearchType notContains `
-Date '11.1.2025 14:30:00' `
-Serviceability User `
-Severity Warning
$result|Format-List
The following example returns detailed information about a specific alert.
param ( 
[Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] $ClientID,
[Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] $UserSecret
)

$securePassword = ConvertTo-SecureString $UserSecret -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential($ClientID, $securePassword))
$hostOnprem = "192.0.2.0"

$connection = Connect-LXC1 -PortalAddress $hostOnprem `
-Credential $cred `
-PortalType cloud `
-SkipCertificateCheck

$result = Get-LXC1Alert -ID "20656:FQXSPPW0104J:5CDCAC64F343457197EF1994E98BD773"
$result|Format-List