Chris Hahn1709163280 Posted March 22, 2022 Share Posted March 22, 2022 Trying to Import OS layer on a new appliance and getting the error below. PS C:\windows\setup\scripts> .\ImportOsLayer.ps1 -elmaddress x.x.x.x -ignorecerterrors ModuleType Version Name ExportedCommands ---------- ------- ---- ---------------- Script 0.0 __DynamicModule_130b5b1d-7814-41... {New-CALOperatingSystem, New-CALSession} Failed to call API at x.x.x.x and Method Login. System.Net.WebException: The remote server returned an error: (400) Bad Request. at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request) at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord() At line:56 char:9 + throw "Failed to call API at $address and Method $method. $Ex ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (Failed to call ...ProcessRecord():String) [], RuntimeException + FullyQualifiedErrorId : Failed to call API at x.x.x.x and Method Login. System.Net.WebException: The remote server returned an error: (400) Bad Request. at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request) at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord() Link to comment
0 Rob Zylowski Posted March 23, 2022 Share Posted March 23, 2022 Chris I'll check with engineering to see if they have any ideas. Seems to be failing right away. Link to comment
0 Rob Zylowski Posted March 23, 2022 Share Posted March 23, 2022 The engineers said to check for any non-alpnumeric characters in any of the arguments you entered. Also there is a log on the appliance in /var/log/Unidesk/web.log that should have more info on how far you got or what it didnt like about the request. And of course it has to be able to talk to the appliance but I assume you are running that from a machine with http/s access to the appliance. Link to comment
Question
Chris Hahn1709163280
Trying to Import OS layer on a new appliance and getting the error below.
PS C:\windows\setup\scripts> .\ImportOsLayer.ps1 -elmaddress x.x.x.x -ignorecerterrors
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 0.0 __DynamicModule_130b5b1d-7814-41... {New-CALOperatingSystem, New-CALSession}
Failed to call API at x.x.x.x and Method Login. System.Net.WebException: The remote server returned an error:
(400) Bad Request.
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
At line:56 char:9
+ throw "Failed to call API at $address and Method $method. $Ex ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Failed to call ...ProcessRecord():String) [], RuntimeException
+ FullyQualifiedErrorId : Failed to call API at x.x.x.x and Method Login. System.Net.WebException: The remote
server returned an error: (400) Bad Request.
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
Link to comment
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now