< Back

Invoke-iBMCFileUpload

Tue Jan 14, 2020 3:03 am

NAME Invoke-iBMCFileUpload



SYNOPSIS

Upload local file to iBMC temp storage.





SYNTAX

Invoke-iBMCFileUpload [-Session] <RedfishSession[]> [-FileUri] <String[]> [<CommonParameters>]





DESCRIPTION

Upload local file to iBMC temp storage. The file will be put under '/tmp/web' folder.





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



-FileUri <String[]>

Indicates the local file uri of firmware file.



File to be uploaded.

V3 servers support the following file formats: "hpm","cer","pem","cert","crt","pfx","p12","xml","keys","pub".

V5 servers support the following file formats: "hpm","zip","asc","cer","pem","cert","crt","pfx","p12",

"xml","keys","pub".

The maximum file size is as follows:

- hpm file for V3 servers: 46 MB

- hpm, zip, or asc file for V5 servers: 60 MB

- cer, pem, cert, crt, xml, p12: 1 MB

- pfx or keys file: 2 MB

- pub file: 2 KB



FileUri examples:

- C:\\2288H_V5_5288_V5-iBMC-V318.hpm

- \\\\192.168.1.2\\2288H_V5_5288_V5-iBMC-V318.hpm



Required? true

Position? 3

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 uploaded file path 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:\\> $Path = Invoke-iBMCFileUpload -Session $session -FileUri E:\\2288H_V5_5288_V5-iBMC-V318.hpm

PS C:\\> $Path



Path

----

/tmp/web/2288H_V5_5288_V5-iBMC-V318.hpm











RELATED LINKS

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



Invoke-iBMCFileDownload

Connect-iBMC

Disconnect-iBMC