Powershell script to fetch Citrix Xenapp server sessions information

There are different kind of sessions created on Citrix servers. we can get various information regarding sessions either from access management console or Powershell. In this article I am sharing a script I created to get session information for couple of servers. The command I user for session information is Get-XAsession. It would give information the sessions with various details. Below script fetches Sessiontype(ICA, RDP or console), server name and user's ID. add-pssnapin Citrix.* $report = Get-XASession -ServerName Server1 | Select sessionname, servername,accountname $report += Get-XASession -ServerName Server2 | Select sessionname, servername,accountname $a = "<style>"…Read more …

Close a handle to a locked file or folder

Yesterday I came along an issue in which I was not able to reset user’s profile. I was getting below error. The action can't be completed because the folder or a file in it is open in another program. The reason I was getting below error was because there were some files opened from user’s profile which were used by some other processes. To overcome this I found this utility by Microsoft called Handle. Handle is a utility that displays information about open handles for any process in the system. You can use…Read more …