Jump to content
  • 0

Log Off multiple users from a certain application in XenApp with powershell


Bit-101

Question

2 answers to this question

Recommended Posts

  • 0

Hi Bit10101,

 

it's tricky as far as I know. You are able to use Citrix Director -> Filter -> All application instances -> BUT you can logoff these users only.

 

I wrote a powershell script which reads the open processes on a server. I select the desired one and the script then terminates the processes found on each server.

 

Quick example of a script, which can be run from a management machine:

$XAServerList = Get-BrokerMachine -MaxRecordCount 200 | Sort-Object DNSName | Select-Object -ExpandProperty DNSName

$ProcessName = Read-Host -Prompt "Enter process name"

foreach ($Server in $XAServerList)
{
$ScriptToRunRemote = {param($ProcessName); Get-Process -Name $ProcessName -ErrorAction SilentlyContinue | Stop-Process -Force -PassThru}
Invoke-Command -ComputerName $Server -ScriptBlock $ScriptToRunRemote -ArgumentList $ProcessName
}

 

Long time ago I've told this feature need on a Citrix event to someone but never got a response from this person.

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