Jump to content
Welcome to our new Citrix community!
  • 0

Error when running ImportOsLayer.ps1 - Failed to call API / (400) Bad Request - App Layering 2203


Chris Hahn1709163280

Question

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

  • 0

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...