Skip to content

Set-NSLBServer fails with "Invalid nitro action or operation" on NS12.1 49.23.nc #97

Description

@Invoke-Humor

Running Set-NSLBServer fails with Invalid nitro action or operation on NS12.1 49.23.nc. This appears to be related to Update action error #16. I suspect this may be an issue with the other Set cmdlets in the module - at least on the newer versions of NetScaler.

Expected Behavior

There is no error and the operation completes successfully.

Current Behavior

Invoking Set-NSLBServer and specifying valid Sesssion, Name, and IPAddress parameters fails:

PS C:\> Set-NSLBServer -Session $session -Name 'servername' -IPAddress '10.0.0.1'

Invoke-RestMethod : { "errorcode": 1240, "message": "Invalid nitro action or operation", "severity": "ERROR" }
At C:\Users\user\Documents\WindowsPowerShell\Modules\NetScaler\1.7.0\Private\_InvokeNSRestApi.ps1:144 char:21
+         $response = Invoke-RestMethod @restParams
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

Possible Solution

The solution appears to be to remove -Action update from line 87 of Set-NSLBServer.ps1, for example:

_InvokeNSRestApi -Session $Session -Method PUT -Type nshostname -Payload $params # -Action update

Your Environment

  • Module Version: 1.7.0
  • Operating System: Windows 10 1803 Build 17134.706
  • PowerShell Version: 5.1.17134.590
  • NetScaler Version: NS12.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions