This cmdlet downloads (exports) one or more switch configuration-data files to the local system.

Note: You cannot pipe objects to this cmdlet.


Get-LXCASwitchConfigFile [-Connection LXCAConnection] 
                         [-FileName String[]]
                         [-Destination String] 


-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.
-FileName String[]
Specifies the name of the configuration-data file.
-Destination String
Specifies the local directory where the file is to be saved.

If not specified, this cmdlet downloads a file named to the current PowerShell working directory.

If specified, the cmdlet overwrites the local file when a file with that same name exists already.
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.


This cmdlet returns a string that contains the full name of the retrieved file.


The following example downloads a single configuration-data file to the default directory on the local system, and overwrites the file if it already exists.
$cred = Get-Credential
Connect-LXCA -Host -Credential $cred

Get-LXCASwitchConfigFile -FileName Switch1.cfg -Overwrite

The following example downloads all configuration-data files to the current PowerShell working directory on the local system.
$cred = Get-Credential
Connect-LXCA -Host "" -Credential $Cred -SkipCertificateCheck
$configData = Get-LXCASwitchConfigData -ConfigData
$files = @()
foreach ($config in $configData)
   $files += $config.FileName
$configFilesArchive = Get-LXCASwitchConfigFile -FileName $files

Related links