How to a list of Users for an application and show application details in XenApp Farm using Powershell

I found that I often times need to find who an application is published to and which folder the application is hiding inside of in the Citrix delivery services console. To do that you need to do code similar to this. In this instance, I would be finding all applications with the name starting with "3m": You can do many things by using this loop like showing Client Folders, working directory, listing the executable, listing if the applications are enabled or not. This uses both get-xaapplication and get-xaaccount to output into a nice table you can save to csv, email, or whatever. Contributed by David Rowe