Restart iBMC (Huawei)
Aus Wiki-WebPerfect
With the following PowerShell-Script you can restart the iBMC. That OS on the hardware does not affect, only iBMC restarts.
$Node = "<iBMC IP>" #IP or Hostname of the iBMC instance -> Please change $Headers = @{Authorization = "Basic <TOKEN>"} #HTTP Basic Authentication -> Please change #region SSL - Because of the unsigned certs in iBMC we have to trust all certs add-type @" using System.Net; using System.Security.Cryptography.X509Certificates; public class TrustAllCertsPolicy : ICertificatePolicy { public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem) { return true; } } "@ [System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Ssl3, [Net.SecurityProtocolType]::Tls, [Net.SecurityProtocolType]::Tls11, [Net.SecurityProtocolType]::Tls12 #REST Call to find the Blade-Number $Blade = ((Invoke-RestMethod -Uri "https://$Node/redfish/v1/Systems" -Method Get -Headers $headers -ErrorAction Continue).Members)."@odata.id" -split "/" | Select-Object -Last 1 #REST call to restart iBMC $Body = @{ResetType = "ForceRestart"} | ConvertTo-Json Invoke-WebRequest -Uri "https://$Node/redfish/v1/Managers/$Blade/Actions/Manager.Reset" -Method POST -Body $Body -Headers $Headers -ContentType "application/json" -UseBasicParsing