Back to Geneos FAQ

How to address the error "ConvertTo-SecureString : Key not valid for use in specified state." in the Citrix Integration solution

Cause Copied

One may encounter the following error when setting up the Geneos Citrix Integration template for the first time:

<Wed Apr 7 21:32:28> ERROR: TOOLKIT2 ConvertTo-SecureString : Key not valid for use in specified state.

At C:\Program Files\NetprobeNT gelo 6371\citrix-sessions.ps1:18 char:14

- $secpasswd = ConvertTo-SecureString -String $password

- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- CategoryInfo : InvalidArgument: (:) [ConvertTo-SecureString], CryptographicException

- FullyQualifiedErrorId : ImportSecureString_InvalidArgument_CryptographicError,Microsoft.PowerShell.Commands.ConvertToSecureStringCommand

New-Object : Exception calling ".ctor" with "2" argument(s): "Cannot process argument because the value of argument

"password" is null. Change the value of argument "password" to a non-null value."

At C:\Program Files\NetprobeNT gelo 6371\citrix-sessions.ps1:21 char:12

- $mycreds = New-Object System.Management.Automation.PSCredential($user ...

- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException

- FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand

Invoke-RestMethod : Unable to connect to the remote server

At C:\Program Files\NetprobeNT gelo 6371\citrix-sessions.ps1:24 char:15

- ... essions = $(Invoke-RestMethod -Uri $($endpoint + '/Sessions/' + $ses ...

- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException

- FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

This happens when the Citrix password is not encrypted by the Netprobe user. For example:

Solution Copied

Encrypt the Citrix password using the Netprobe user.

["Geneos"] ["Geneos > Netprobe"] ["FAQ"]

Was this topic helpful?