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

CitrixPOSHsdk prompts for Cloud login when used remotely

Bill Crum


I am trying to build a script that can be called from an Orchestrator Runbook that users can access from a request offering from Service manager to stop their stuck sessions.


Essentially I need to do the following on XA6

Get-XASession | ?{$_.AccountName -eq $VariableContainingUsername} | Stop-XASession


AND on XA7 (We have 2 farms)

Get-BrokerSession -username $VariableContainingUsername | Stop-brokersession


We want to kill all user sessions when a user uses this.


Problem is, I installed the CitrixPOSHsdk on my orchestrator server, and when I attempt to run a command from there it gives me a citrix cloud popup window wanting me to sign in.


I do not know if there is a better way to accomplish what I want to do, and if there is please let me know. it has to be done remotely from a non-citrix server. I tried saving a ps1 script on the management server and calling it and that did not work either, which may be because I am not to experienced at powershell remoting.


Any help would be great! Thanks!


Our HelpDesk gets 3000+ calls per month for session resets, and we are trying to provide a self service function for end users to do this themselves.

Link to comment

8 answers to this question

Recommended Posts

  • 2

To add on KamleshV  response if still using on-prem infra and remoting with PS SDK., before executing  any powershell SDK command specifically connecting to Broker with -AdminServer  run the follwing command  Set-XDCredentials -ProfileType OnPrem

This will suppress the Citrix Cloud login.

  • Like 2
Link to comment
  • 0

We installed the PowerShell module CitrixPOSHsdk that support provided us. I tried using this -AdminAddress Servername in my command and it still did the window popup :(.


I did the following:

Add-PSSnapin Citrix*

Get-BrokerSession -AdminAccess ServerName -username Username


this gave me another popup asking me to login to citrix cloud.

I CAN run this on my server without any problem, it is doing it remotely that is breaking it.

Link to comment
  • 0

You can explicitly authenticate by using the Get-XdAuthentication cmdlet.
Otherwise, while executing your first Citrix Virtual Apps and Desktops PS SDK command, it will prompt you for the same authentication as Get-XdAuthentication.

To bypass the authentication prompt, you can use the Set-XdCredentials cmdlet to create a default authentication profile, using a Secure Client created in the Citrix Cloud console.


Link to comment

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