< Back

Import-iBMCBIOSSetting

Tue Jan 14, 2020 3:01 am

NAME Import-iBMCBIOSSetting



SYNOPSIS

Import iBMC BIOS and BMC configuration





SYNTAX

Import-iBMCBIOSSetting [-Session] <RedfishSession[]> [-ConfigFilePath] <String[]> [<CommonParameters>]





DESCRIPTION

Import iBMC BIOS and BMC configuration. The BIOS setup configuration takes effect upon the next restart of the

system.





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



-ConfigFilePath <String[]>

The bios&bmc configuration file path



File path support:

1. import from local storage, example: C:\\config.xml or \\\\192.168.1.2\\config.xml

2. import from ibmc local temporary storage, example: /tmp/filename.xml

3. import from remote storage, example: protocol://username:password@hostname/directory/filename.xml

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 the import configuration task array 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:\\> $Tasks = Import-iBMCBIOSSetting $session 'C:\\10.10.10.2.xml'

PS C:\\> $Tasks



Host : 10.1.1.2

Id : 2

Name : Import Config File Task

ActivityName : [10.1.1.2] Import Config File Task

TaskState : Completed

StartTime : 2018-11-14T17:54:54+08:00

EndTime : 2018-11-14T17:56:06+08:00

TaskStatus : OK

TaskPercent : 100%



This example shows how to import bios settings from local file









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>$credential = Get-Credential



PS C:\\> $session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert

PS C:\\> $Tasks = Import-iBMCBIOSSetting $session '/tmp/bios.xml'

PS C:\\> $Tasks



Id : 2

Name : Import Config File Task

ActivityName : [10.1.1.2] Import Config File Task

TaskState : Completed

StartTime : 2018-11-14T17:54:54+08:00

EndTime : 2018-11-14T17:56:06+08:00

TaskStatus : OK

TaskPercent : 100%



This example shows how to import bios settings from ibmc temp file









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>$credential = Get-Credential



PS C:\\> $session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert

PS C:\\> $LocalFilePath = 'c:\\bios.xml'

PS C:\\> $Upload = Invoke-iBMCFileUpload -Session $session -FileUri $LocalFilePath

PS C:\\> $Tasks = Import-iBMCBIOSSetting $session $Upload.Path

PS C:\\> $Tasks



Id : 2

Name : Import Config File Task

ActivityName : [10.1.1.2] Import Config File Task

TaskState : Completed

StartTime : 2018-11-14T17:54:54+08:00

EndTime : 2018-11-14T17:56:06+08:00

TaskStatus : OK

TaskPercent : 100%



This example shows how to upload local file to BMC and then import bios settings from the upload bmc file









-------------------------- EXAMPLE 4 --------------------------



PS C:\\>$credential = Get-Credential



PS C:\\> $session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert

PS C:\\> $Tasks = Import-iBMCBIOSSetting $session 'nfs://10.10.10.3/data/nfs/bios.xml'

PS C:\\> $Tasks



Id : 2

Name : Import Config File Task

ActivityName : [10.1.1.2] Import Config File Task

TaskState : Completed

StartTime : 2018-11-14T17:54:54+08:00

EndTime : 2018-11-14T17:56:06+08:00

TaskStatus : OK

TaskPercent : 100%



This example shows how to import bios settings from NFS file











RELATED LINKS

https://github.com/Huawei/Huawei-iBMC-Cmdlets



Export-iBMCBIOSSetting

Reset-iBMCBIOSSetting

Restore-iBMCFactorySetting

Connect-iBMC

Disconnect-iBMC