Get-LXCASwitchConfigData
This cmdlet retrieves information about configuration-data files for RackSwtich and Flex System switches.
Syntax
Get-LXCASwitchConfigData [-Connection LXCAConnection]
[-Uuid String]
[-ConfigData]
[CommonParameter]
Parameters
- -Connection LXCAConnection
- Specifies the connection to the Lenovo XClarity Administrator server. If no connection is specified, the result from the last Connect-LXCA cmdlet is used.
- -Uuid String
- Specifies the UUID of the switch for which information is to be retrieved.
If not specified, this cmdlet retrieves information about configuration-data files for all managed RackSwtich and Flex System switches.
- -ConfigData
- If specified, detailed information about the configuration-data file is returned. This includes the switch UUID, file ID, file name, date, size, and comments.TipIf not specified, you can retrieve detailed information using the
ConfigDatas property in the Lenovo.SysMgmt.LXCA.Integration.Data.SwitchConfigData object (see the examples below). - 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.SysMgmt.LXCA.Integration.Data.SwitchConfigData[]
If -Uuid and -ConfigData are not specified, the cmdlet returns an array of Lenovo.SysMgmt.LXCA.Integration.Data.SwitchConfigData objects, for all managed switches.
Lenovo.SysMgmt.LXCA.Integration.Data.SwitchConfigData
If -Uuid is specified and -ConfigData is not specified, the cmdlet returns a single Lenovo.SysMgmt.LXCA.Integration.Data.SwitchConfigData object, for the switch with the given UUID.
Lenovo.SysMgmt.LXCA.Integration.Data.ConfigData[]
If -ConfigData is specified, the cmdlet returns an array of Lenovo.SysMgmt.LXCA.Integration.Data.SwitchConfigData objects.
In this case, if -Uuid is specified, the array contains data for the switch with the given UUID; otherwise, the array contains data for all managed switches.
Examples
- The following example returns information about configuration-data files for all managed switches, and then displays the detailed information.
$cred = Get-Credential
Connect-LXCA -Host 192.0.2.0 -Credential $cred
# The following two blocks are equivalent in generated output.
# Block 1
$switchesConfig = Get-LXCASwitchConfigData
# $switchesConfig is an array of Lenovo.SysMgmt.LXCA.Integration.Data.SwitchConfigData objects.
$switchesConfig.ConfigDatas
# Block 2
Get-LXCASwitchConfigData -ConfigData
Disconnect-LXCA - The following example returns information about configuration-data files for the switch with the specified UUID, and then displays the detailed information.
$cred = Get-Credential
Connect-LXCA -Host 192.0.2.0 -Credential $cred
$switchUuid = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
# The following two blocks are equivalent in generated output.
# Block 1
$switchConfig = Get-LXCASwitchConfigData -Uuid $switchUuid
# $switchConfig is asingle Lenovo.SysMgmt.LXCA.Integration.Data.SwitchConfigData object.
$switchConfig.ConfigDatas
# Block 2
Get-LXCASwitchConfigData -Uuid $switchUuid -ConfigData
Disconnect-LXCA