If the error is a functional one (for example using the wrong credentials, parameter value or LoadMaster IP address) the cmdlet returns a PowerShell object, as described, with a ReturnCode containing the code of the error and with Response containing the description of the error that has occurred.

For example: Try to get the firmware version installed on the LoadMaster using an invalid certificate (installed in the Windows machine but not belonging to any user inside the LoadMaster):

$lma = Get-LmParameter -Param version -LoadBalancer 172.21.59.85 -SubjectCN user1
$lma
ReturnCode Response                                                Data
---------- --------                                                 ----
       401 The remote server returned an error: (401) Unauthorized.     

If the error is due to a wrong/missing mandatory input, the cmdlet throws an exception. These types of errors do not return a ReturnCode because an exception has been thrown. The execution of the command is halted.

For example: Get the firmware version installed on the LoadMaster using a certificate not installed in the Windows machine:

$lma = Get-LmParameter -Param version -LoadBalancer 172.21.59.189 `
                                                       -SubjectCN invalidcertificate
ERROR: Can't find a certificate with "invalidcertificate" as CN in the default Cert:\CurrentUser\My store.
At C:\Users\ExampleUser\Work\Kemp.LoadBalancer.Powershell\Kemp.LoadBalancer.Powershell.psm1:273 char:5
+                 Throw $errStr
+                 ~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (ERROR: Can't fi...tUser\My store.:String) [], RuntimeException
    + FullyQualifiedErrorId : ERROR: Can't find a certificate with "invalidcertificate" as CN in the default Cert:\CurrentUser\My store.

For example: Get the firmware version installed on the LoadMaster without credentials/certificate:

$lma = Get-LmParameter -Param version -LoadBalancer 172.21.59.189 
ERROR: login method param is empty. Credentials or SubjectCN must be specified.
At C:\Users\ExampleUser\Work\Kemp.LoadBalancer.Powershell\Kemp.LoadBalancer.Powershell.psm1:244 char:3
+         Throw $errStr
+         ~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (ERROR: login me...t be specified.:String) [], RuntimeException
    + FullyQualifiedErrorId : ERROR: login method param is empty. Credentials or SubjectCN must be specified.
 
Note: The connection drops if more than 30 calls are performed in less than 3 seconds over all API interfaces.