This is continuation to my previous post. I want to add more commands that System Administrator require to manage XenApp environment using powershell. Below are some of them. I will extend the list as and when I find something.
Get the list of Users currently using a published XenApp Application:
Get-XASession -BrowserName notepad | select AccountName
Get the computer(or client) name from where a XenApp Application is launched
Get-XASession -BrowerName notepad | select ClientName, AccountName
Logoff a user(user1) session who opened “MS Word” application in XenApp:
(Get-XASession -BrowserName “MS Word” -ServerName XenAPP1 | ? {$_.AccountName -match “User1” }).SessionID | Stop-XASession
Get all published XenApp applications on a Server
Get-XAApplication -ServerName XenApp1 | select DisplayName
Get all Desktops published in XenApp environment
Get-XAApplication | ? {$_.ApplicationType -eq “ServerDesktop” } | select DisplayName
Get the users or groups who has permission to a published application:
Get-XAAccount -BrowserName App1
How to get the list of processes running in a given XenApp session on server:
Get-XASessionProecss -ServerName XenApp1 -Sessionid 10
Rename a published XenApp Application (or change displayname of XenApp Application):
Get-XAApplication -BrowserName “My Notepad” | Rename-XAApplication -NewDisplayName “My Notepad – OLD”
Change the description of a XenApp application:
Get-XAApplication -BrowserName “My Notepad – OLD” | Set-XAApplication -Description “This is going to retire”