Skip to main content

Get-LXC1Device

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

Note
You cannot pipe objects to this cmdlet.

Syntax

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

Get-LXC1Devic [-Status String[]]
[-DeviceType String[]]
[-Name String[]]
[-NameSearchType String]
[-IPAddress String[]]
[-IPAddressSearchType String]
[-Anywhere String[]]
[-AnywhereSearchType String]
[-Connection LXC1Connection]
[CommonParameter]
Parameters
-ID String
Specifies the ID of the device to return.
-Status String[]

Specifies the device status. All devices that match any of the specified statues are returned. This can be one or more of the following values, separated by a comma.

  • informational
  • warning
  • critical
  • unknown
-DeviceType String[]
Specifies the device type. All devices that match any of the specified types are returned. This can be one or more of the following values, separated by a comma.
  • lenovoServers
-IPAddress String[]
Specifies one or more full or partial IP addresses, separated by comma. All devices that match any of the specified patterns based on the operator (-IPAddressSearchType parameter) are returned.
-IPAddressSearchType String
Specifies the operator to use for patterns in the -IPAddress parameter. This can be one of the following values.
  • contains (default)
  • notContains
  • equals
  • notEquals

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

-Name String[]
Specifies one or more full or partial device names, separated by comma. All devices that match any of the specified patterns based on the operator (-NameSearchType parameter) are returned.
-NameSearchType String
Specifies the operator to use for patterns in the -Name parameter. This can be one of the following values.
  • contains (default)
  • notContains
  • equals
  • notEquals

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

-Anywhere String[]
Specifies one or more full or partial text found in any device attributes, separated by a comma. All devices 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 information about all devices.
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-LXC1Device

$result|Format-List
The following example returns devices based on name, IP address, and device type.
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-LXC1Device -DeviceType server `
-IPAddress 33.34 `
-IPAddressSearchType notContains `
-Name myDevice `
-NameSearchType contains
$result|Format-List
The following example returns a detailed information about a specific device.
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-LXC1Device -ID "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA-BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
$result