Get-LXCODeviceServiceData
This cmdlet returns a list of all service-data archives or saves to the local system, one or more specific service-data archives for one or more devices.
- You cannot pipe objects to this cmdlet.
- The returned file is a tar.gz archive if more then one device FFDC is downloaded or a tzz archive if one FFDC file is downloaded.
Syntax
Get-LXCODeviceServiceData [-Connection LXCOConnection]
[-ArchiveName String[]]
[-ResourceName String[]]
[-GroupsName String[]]
[-TimeStamp String[]]]
[CommonParameter]
Get-LXCODeviceServiceData [-Connection LXCOConnection]
-Destination String
[-Overwrite ]
-FfdcIDs String[]
[CommonParameter]
Get-LXCODeviceServiceData [-Connection LXCOConnection]
-Destination String
[-Overwrite ]
-ResourceIDs String[]
[-CollectLatest ]
[CommonParameter]
Get-LXCODeviceServiceData [-Connection LXCOConnection]
-Destination 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.
- -ArchiveName String[]
- Specifies one or more full or partial archive names, separated by a comma. All archives that contain the specified pattern are returned.
- -ResourceName String[]
- Specifies the name of one or more devices that are associated with the service data archive, separated by a comma.
- -GroupsName String[]
- Specifies one or more full or partial resource-group names, separated by a comma. All service files that contain the specified pattern are returned.
- -TimeStamp String[]
- Specifies the timestamp when the service data files were collected, as range, using the following format: {startDate},{endDate}. The end date is optional. If not specified, the current date is used by default.
- -Destination String
- Specifies the directory and file name where the file is to be saved on the local system.
If you do not specify a file name (in other words, if the destination ends in a back slash "\"), the default file name, provided by the orchestrator, is used.
If the directory does not exist, it is automatically created.
- -Overwrite
- When specified, if the file already exists in the specified directory, the file is overwritten. If not specified, and the file already exists in the specified directory, the file is not overwritten, and the System.IO.IOException: The {full_ffdc_file_path} file already exists exception is thrown.
- -FfdcIDs String[]
- Specifies the IDs of the service files to download, comma separated.
- -ResourceIDs String[]
- Specifies the IDs of the devices for which service files are downloaded, comma separated.
- -CollectLatest
- When specified, the latest service data for devices specified by -ResourceIDs is collected and downloaded.
- 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.DeviceServiceDataDetails[]
If the -Destination parameter is not supplied, this cmdlet returns a DeviceServiceDataDetails[] array that contains information about all service-data archives.
- System.String
If the -Destination parameter is specified, this cmdlet downloads the devices service-data file to the specified directory on the local system and returns a System.String object that contains the full path of the saved 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
$cred = Get-Credential
Connect-LXCO -HostUri 192.0.2.0 -Credential $cred -SkipCertificateCheck
$(Get-LXCODeviceServiceData -Destination C:\LXCODeviceServiceData\)
Disconnect-LXCO
$cred = Get-Credential
Connect-LXCO -HostUri 192.0.2.0 -Credential $cred -SkipCertificateCheck
$ffdcIDs = @( "94b863c9000f7882143fc7e17ed29d98e08bb538",
"813c6d127cf1be6d2bdeda09d03dde79c3dcf41c",
"84267e359065775b3b7d85a10bda2a39ec52d999" )
$(Get-LXCODeviceServiceData -Destination C:\LXCODeviceServiceData\ -FfdcIDs $ffdcIDs)
Disconnect-LXCO
$cred = Get-Credential
Connect-LXCO -HostUri 192.0.2.0 -Credential $cred -SkipCertificateCheck
$ids = @( "92E7C1B5912911E6A0599DE30E1BEFFB-94084F7CDA0E4CFB999DE392A458B778",
"640CD4D706E711E8A391BD658DF61E04-94084F7CDA0E4CFB999DE392A458B778")
$(Get-LXCODeviceServiceData -Destination C:\LXCODeviceServiceData\ `
-ResourceIDs $ids -CollectLatest)
Disconnect-LXCO