Citrix XenApp 6: 12 Command-Line Tools Worth Knowing
While managing your Citrix XenApp 6 farm from the comfort of the Citrix Delivery Services Console GUI tool is a very powerful thing, you should know that XenApp 6 also has a subset of command-line tools that are at your disposal and can help with advanced farm management and troubleshooting:
1. Altaddr: If you're a Citrix old timer, you probably remember using this tool before secure gateway was available, in order to extend the published applications to users outside the secure network. In essence, what Altaddr allows you to do is give your XenApp server an alternate IP address. Traditionally this was an outside facing public IP address or some kind of a NAT. Of course, the down side is if you have 100 XenApp servers, you would need 100 public IP addresses. Altaddr is not in use or popular anymore, but it is still there if you have the distinct situation where it makes sense.
2. App: Typically used for scripting or customizing an application's behavior. You can use App in your scripts to control the application's environment or to satisfy its prerequisites before the application runs.
3. Auditlog: A handy utility that, for the most part, dumps the security event log from Windows and allows you to pipe that log into a text file. You can use the output to audit who logged in or out of the server and when. This could come in handy if you are troubleshooting, for example, if your print service crashes; you can see who logged in during that time and if they are mapping a bad driver, etc.
4. Change client: Allows you to change the client device mappings in an ICA session, LOT, COM, USB mappings. etc.
5. Ctxkeytool: You can use this utility to generate an encryption key that can be used when enabling IMA encrypted communication in the Citrix farm.
6. Ctxxmlss: This handy little utility allows you to modify the XML port on the XenApp servers should you need to change that port for any reason.
7. Dscheck: I use this tool frequently to check for consistency on the Citrix IMA data store. It is particularly handy in conjunction with the /clean switch, which you would use to clear out any inconsistencies in the database.
8. Dsmaint: All interaction with your data store can be manipulated using this tool. For example, if you want to change data store database servers, you can use Dsmaint to do so. You can also use it to verify the local host cache on the XenApp server. The Local Host Cache or LHC is a subset of the data store database that runs on each XenApp server. Sometimes, as a troubleshooting step, you may want to verify the accuracy of that data or even refresh it altogether.
9. Enablelb: This utility restores XenApp servers into the load balancing mix after they have failed Citrix health monitoring tests.
10. Icaport: Here's a too that allows you to change the default port that the ICA protocol typically runs on.
11. Imaport: allows you to change the default port that the IMA protocol runs on
12. Query: Arguably the most useful command-line tool, I use the query command for troubleshooting, for verifying load on the server, for just about anything administration related. If I need to know, I always start with the query command. It has a subset of values:
- Query Farm or QFARM returns information on the XenApp servers in the farm and which one is a data collector
- Query Session returns information about the sessions that are running on the XenApp server
- Query Process will return the all the running processes on the server
- Query User or QUSER returns information about all the users on the server
All these tools are available to you with the default installation of XenApp 6. However, as you can see from the list above, the number of Citrix XenApp 6 command-line tools has been shrinking with each new version and that is not because of insufficient development. Instead, it's because Citrix is kind of following the Microsoft lead and porting most of its command-line tools to PowerShell. Event so, XenApp 6 has a very rich PowerShell footprint, wihich I plan to explore more in future blogs.
Posted by Elias Khnaser on 06/30/2011 at 12:49 PM