Skip to main content

Get-LXCOServerConfigPattern

This cmdlet returns a list of server-configuration pattern or details about a specific server-configuration pattern.

Note
You cannot pipe objects to this cmdlet.

Syntax

Get-LXCOServerConfigPattern [-Connection LXCOConnection]
[-Name String[]]
[-Description String[]]
[-LastUpdate String[]]
[CommonParameter]

Get-LXCOServerConfigPattern [-Connection LXCOConnection]
-ID String
[-OutFile String]
[-Overwrite]
[CommonParameter]

Parameters

-Connection LXCAConnection
Specifies the connection to the Lenovo XClarity Orchestrator server. If no connection is specified, the result from the last Connect-LXCO cmdlet is used.
-ID String
Specifies the update compliance policy ID.
-OutFile String
If specified, data is saved as a file in JSON format in the specified location.

If a directory is specified (if the string ends with \ or /), the file name is saved as {pattern_name}-{current_timestamp}.json. The timestamp format is MMDDYYYY-HHMMss.

-Name String[]
Specifies one or more full or partial pattern names, separated by a comma. A list of all patterns that match the specified names is returned.
-Description String[]
Specifies one or more full or partial pattern descriptions, separated by a comma. A list of all patterns that match the specified descriptions is returned.
-LastUpdate String[]
Specifies the last update timestamp, as range using the following format: {startDate},{endDate}. The end date is optional. If is not specified, the current date is used by default.
-Overwrite
If specified, the file is overwritten if it exists in the specified directory.

If not specified, and if the file exists in the specified directory, the file is not overwritten, and the System.IO.IOException: The <full_config-pattern_file_path> file already exists exception is thrown.

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 patterns.
Connect-LXCO -HostUri 192.0.2.0 -Credential $cred -SkipCertificateCheck

$result = Get-LXCOServerConfigPattern
$result | Format-List

Disconnect-LXCO
The following example returns information about specific pattern as a JSON file in the specified location.
$cred = Get-Credential
Connect-LXCO -HostUri 192.0.2.0 -Credential $cred -SkipCertificateCheck

$result = Get-LXCOServerConfigPattern -ID 1636021473564 -OutFile $PSScriptRoot\..\test\
$result

Disconnect-LXCO
The following example returns a list of patterns that match specific criteria.
$cred = Get-Credential
Connect-LXCO -HostUri 192.0.2.0 -Credential $cred -SkipCertificateCheck

$result = Get-LXCOServerConfigPattern -Name SR350 -LastUpdate "8/25/2022 9:22:34"
$result | Format-List

Disconnect-LXCO