< Back
Export-iBMCMaintenanceInfo
Post
NAME Export-iBMCMaintenanceInfo
SYNOPSIS
Collect maintenance information of all boards and export to local storage.
SYNTAX
Export-iBMCMaintenanceInfo [-Session] <RedfishSession[]> [-ExportTo] <String[]> [<CommonParameters>]
DESCRIPTION
Collect maintenance information of all boards and export to local storage.
This cmdlet will cost up to 10 minutes to collection infomation and several minutes to download, please be
patience.
PARAMETERS
-Session <RedfishSession[]>
iBMC redfish session object which is created by Connect-iBMC cmdlet.
A session object identifies an iBMC server to which this cmdlet will be executed.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-ExportTo <String[]>
The dest export to file path:
Export to path examples:
1. export to ibmc local temporary path: /tmp/filename.tar.gz
2. export to remote path: protocol://username:password@hostname/directory/filename.tar.gz
support protocol list: sftp, https, nfs, cifs, scp
Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
PSObject[][]
Returns iBMC System LinkUp Ethernet Interfaces if cmdlet executes successfully.
In case of an error or warning, exception will be returned.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> $ExportTo = "nfs://10.10.10.3/data/nfs/collect.tar.gz"
PS C:\\> $Tasks = Export-iBMCMaintenanceInfo -Session $session -ExportTo $ExportTo
PS C:\\> $Tasks
Host : 10.1.1.2
Id : 1
Name : Export Dump File Task
ActivityName : [10.1.1.2] Export Dump File Task
TaskState : Completed
StartTime : 2019-01-19T04:22:13+00:00
EndTime : 2019-01-19T04:30:19+00:00
TaskStatus : OK
TaskPercent : 100%
This example shows how to export collect tarball file to NFS.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $session = Connect-iBMC -Address 10.1.1.2,10.1.1.3 -Credential $credential -TrustCert
PS C:\\> $ExportTo = @("nfs://10.10.10.3/data/nfs/2.tar.gz", "nfs://10.10.10.3/data/nfs/3.tar.gz")
PS C:\\> $Tasks = Export-iBMCMaintenanceInfo -Session $session -ExportTo $ExportTo
PS C:\\> $Tasks
Host : 10.1.1.2
Id : 1
Name : Export Dump File Task
ActivityName : [10.1.1.2] Export Dump File Task
TaskState : Completed
StartTime : 2019-01-19T04:22:13+00:00
EndTime : 2019-01-19T04:30:19+00:00
TaskStatus : OK
TaskPercent : 100%
Host : 10.1.1.3
Id : 1
Name : Export Dump File Task
ActivityName : [10.1.1.3] Export Dump File Task
TaskState : Completed
StartTime : 2019-01-19T04:22:13+00:00
EndTime : 2019-01-19T04:30:19+00:00
TaskStatus : OK
TaskPercent : 100%
This example shows how to export collect tarball file to NFS for multiply servers.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> $ExportTo = "/tmp/collect.tar.gz"
PS C:\\> $Tasks = Export-iBMCMaintenanceInfo -Session $session -ExportTo $ExportTo
PS C:\\> $Tasks
Host : 10.1.1.2
Id : 1
Name : Export Dump File Task
ActivityName : [10.1.1.2] Export Dump File Task
TaskState : Completed
StartTime : 2019-01-19T04:22:13+00:00
EndTime : 2019-01-19T04:30:19+00:00
TaskStatus : OK
TaskPercent : 100%
This example shows how to export collect tarball file to BMC temp storage.
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> $ExportTo = "/tmp/collect.tar.gz"
PS C:\\> Export-iBMCMaintenanceInfo -Session $session -ExportTo $ExportTo
PS C:\\> $LocalFilePath = 'C:\\collect.tar.gz'
PS C:\\> Invoke-iBMCFileDownload -Session $session `
-BMCFileUri $ExportTo -LocalFileUri $LocalFilePath
This example shows how to export collect tarball file to BMC temp storage
and then download the tarball file to local machine.
RELATED LINKS
https://github.com/Huawei/Huawei-iBMC-Cmdlets
Connect-iBMC
Disconnect-iBMC
SYNOPSIS
Collect maintenance information of all boards and export to local storage.
SYNTAX
Export-iBMCMaintenanceInfo [-Session] <RedfishSession[]> [-ExportTo] <String[]> [<CommonParameters>]
DESCRIPTION
Collect maintenance information of all boards and export to local storage.
This cmdlet will cost up to 10 minutes to collection infomation and several minutes to download, please be
patience.
PARAMETERS
-Session <RedfishSession[]>
iBMC redfish session object which is created by Connect-iBMC cmdlet.
A session object identifies an iBMC server to which this cmdlet will be executed.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-ExportTo <String[]>
The dest export to file path:
Export to path examples:
1. export to ibmc local temporary path: /tmp/filename.tar.gz
2. export to remote path: protocol://username:password@hostname/directory/filename.tar.gz
support protocol list: sftp, https, nfs, cifs, scp
Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
PSObject[][]
Returns iBMC System LinkUp Ethernet Interfaces if cmdlet executes successfully.
In case of an error or warning, exception will be returned.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> $ExportTo = "nfs://10.10.10.3/data/nfs/collect.tar.gz"
PS C:\\> $Tasks = Export-iBMCMaintenanceInfo -Session $session -ExportTo $ExportTo
PS C:\\> $Tasks
Host : 10.1.1.2
Id : 1
Name : Export Dump File Task
ActivityName : [10.1.1.2] Export Dump File Task
TaskState : Completed
StartTime : 2019-01-19T04:22:13+00:00
EndTime : 2019-01-19T04:30:19+00:00
TaskStatus : OK
TaskPercent : 100%
This example shows how to export collect tarball file to NFS.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $session = Connect-iBMC -Address 10.1.1.2,10.1.1.3 -Credential $credential -TrustCert
PS C:\\> $ExportTo = @("nfs://10.10.10.3/data/nfs/2.tar.gz", "nfs://10.10.10.3/data/nfs/3.tar.gz")
PS C:\\> $Tasks = Export-iBMCMaintenanceInfo -Session $session -ExportTo $ExportTo
PS C:\\> $Tasks
Host : 10.1.1.2
Id : 1
Name : Export Dump File Task
ActivityName : [10.1.1.2] Export Dump File Task
TaskState : Completed
StartTime : 2019-01-19T04:22:13+00:00
EndTime : 2019-01-19T04:30:19+00:00
TaskStatus : OK
TaskPercent : 100%
Host : 10.1.1.3
Id : 1
Name : Export Dump File Task
ActivityName : [10.1.1.3] Export Dump File Task
TaskState : Completed
StartTime : 2019-01-19T04:22:13+00:00
EndTime : 2019-01-19T04:30:19+00:00
TaskStatus : OK
TaskPercent : 100%
This example shows how to export collect tarball file to NFS for multiply servers.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> $ExportTo = "/tmp/collect.tar.gz"
PS C:\\> $Tasks = Export-iBMCMaintenanceInfo -Session $session -ExportTo $ExportTo
PS C:\\> $Tasks
Host : 10.1.1.2
Id : 1
Name : Export Dump File Task
ActivityName : [10.1.1.2] Export Dump File Task
TaskState : Completed
StartTime : 2019-01-19T04:22:13+00:00
EndTime : 2019-01-19T04:30:19+00:00
TaskStatus : OK
TaskPercent : 100%
This example shows how to export collect tarball file to BMC temp storage.
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>$credential = Get-Credential
PS C:\\> $session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> $ExportTo = "/tmp/collect.tar.gz"
PS C:\\> Export-iBMCMaintenanceInfo -Session $session -ExportTo $ExportTo
PS C:\\> $LocalFilePath = 'C:\\collect.tar.gz'
PS C:\\> Invoke-iBMCFileDownload -Session $session `
-BMCFileUri $ExportTo -LocalFileUri $LocalFilePath
This example shows how to export collect tarball file to BMC temp storage
and then download the tarball file to local machine.
RELATED LINKS
https://github.com/Huawei/Huawei-iBMC-Cmdlets
Connect-iBMC
Disconnect-iBMC