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

Logout Script for idle Session


Kai Feldmann

Question

Dear Community,

 

i would like to update our Script that does simply logout all sessions at a fixed time per day to a "Logout Sessions idle longer than X" during a defined period (current play is 7PM to 6AM).

But i cannot get the -IdleDuration as a filter for a timeperiod.

 

PS C:\Scripts> Get-BrokerSession -IdleDuration 00:10:00
Get-BrokerSession : Problem occurred contacting the database
At line:1 char:1
+ Get-BrokerSession -IdleDuration 00:10:00
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Get-BrokerSession], SdkOperationException
    + FullyQualifiedErrorId : Citrix.XDPowerShell.Broker.DataStoreException,Citrix.Broker.Admin.SDK.GetBrokerSessionCommand

 

I assume my syntax is broken, i never wrote any Citrix-Scripts, yet >.<

Thanks for your Idea.

 

Thanks you and have a great day.

Kind regards

Marc

Link to comment

1 answer to this question

Recommended Posts

  • 0

Hello Kai,

 

As the first line of output suggests there is a database connection problem at DDC side. The command itself is in good syntax. Please check the database and connection status with an IT worker. If DB is OK, and other commands can succeed, it might also be caused by the result data too large, and you may try to narrow down the query condition.

 

Regards,

Hao Chen

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