Get-LXCOServerConfigPattern
This cmdlet returns a list of server-configuration pattern or details about a specific server-configuration pattern.
Syntax
Get-LXCOServerConfigPattern [-Connection LXCOConnection]
[-Name String[]]
[-Description String[]]
[-LastUpdate String[]]
[CommonParameter]
Get-LXCOServerConfigPattern [-Connection LXCOConnection]
-ID String
[-OutFile String]
[-Overwrite]
[CommonParameter]
Parameters
- -Connection LXCOConnection
- 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.
- -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.
- -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.
- -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.
- -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
- Lenovo.XClarityOrchestrator.PowerShell.Data.ConfigPatternData[]
If -ID is not specified, this cmdlet returns an array of ConfigPatternData[] objects, which contains data about each configuration pattern.
- System.String
If -ID is specified, this cmdlet returns a string contains the configuration pattern details, in JSON format.
If -Destination is specified, this cmdlet returns the path where the configuration pattern is saved as a file.
- Lenovo.XClarityOrchestrator.PowerShell.Data.RequestStatusMessage
If an error occurred, this cmdlet returns a RequestStatusMessage object that contains information about the reason of the failure.
Examples
Connect-LXCO -HostUri 192.0.2.0 -Credential $cred -SkipCertificateCheck
$result = Get-LXCOServerConfigPattern
$result | Format-List
Disconnect-LXCO
$cred = Get-Credential
Connect-LXCO -HostUri 192.0.2.0 -Credential $cred -SkipCertificateCheck
$result = Get-LXCOServerConfigPattern -ID 1636021473564 -OutFile $PSScriptRoot\..\test\
$result
Disconnect-LXCO
$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