I am running a portion of a script to increase the allocated resources to certain VM's within a vCloud vApp. The script does successfully complete sometimes and then errors other times - although it does seem to be more prone to error once the vApp is powered on.
This is the error I get:
ERROR: Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (400) Bad Request."
- MainForm.psf (2478, 2): ERROR: At Line: 2478 char: 2
ERROR: + $RAMresponse = $RAMrequest.GetResponse()
ERROR: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I have attached the portion of the script I have pieced together. I have included the IF statement within the function as it appears as though the error may be due to a task still being in progress on the VM?