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

Citrix Monitor API


Srikant Patil

Question

 Hi Team,

 

I am planning to monitor users session on each servers from a monitoring tool, So i can trigger email notification if threshold breached.

I tried with API and powershell but getting errors  , Unable to connect...See below error,

 

Invoke-RestMethod : The underlying connection was closed: An unexpected error occurred on a send.
At C:\Users\<>\Desktop\MyFolder\Scripts\PowerShell\Citrix_User\CitrixAPI_test.ps1:29 char:17
+ ... $response = Invoke-RestMethod -Uri $trustUrl -Method POST -Body (Conv ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send.
At C:\Users\<>\Desktop\MyFolder\Scripts\PowerShell\Citrix_User\CitrixAPI_test.ps1:49 char:11
+ $result = Invoke-WebRequest -Uri $url -Headers $headers
+           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

 

Please let me know if there any option to fetch logged users from servers.

 

Thanks in advance

Link to comment

1 answer to this question

Recommended Posts

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...