Import-LXCOServerConfigPattern
This cmdlet imports a single file that contains a single server-configuration pattern, in JSON format.
Note
You cannot pipe objects to this cmdlet.
Important
If you modify a server-configuration pattern, do not delete the original pattern before importing the modified pattern.
You cannot import a modified server-configuration pattern to another Lenovo XClarity Orchestrator instance.
Syntax
Import-LXCOServerConfigPattern [-Connection LXCOConnection]
[-Description String]
-InFile String
-Name String
[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.
- -Description String
- Specifies the pattern description. The following characters are not allowed: ! ~ ` # $ ^ ; ' < > ? " \
- -InFiles String
- Specifies the file that contains the server-configuration pattern.
- -Name String
- Specifies the pattern name. The following characters are not allowed: ! ~ ` # $ % ^ & ; ' < > { } ? | " \
- 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.RequestStatusMessage
If an error occurred, this cmdlet returns a RequestStatusMessage object that contains information about the reason of the failure.
- System.String
This cmdlet returns a string which represents the id of the imported pattern
Examples
The following example imports a server-configuration pattern.
$cred = Get-Credential
Connect-LXCO -HostUri "192.0.2.0" -Credential $Cred –SkipCertificateCheck
$file = "c:/config-patterns-store/config_for_server_A.json"
$result = Import-LXCOServerConfigPattern -Name "modiffied pattern" `
-Description "modified config pattern for server A" `
-InFile $file
$result
Disconnect-LXCO
Give documentation feedback