Get-CitrixApplication (Playing Around Series)
Here is a quick demo of getting a Citrix Application and playing with its properties.
Best Viewed Full Screen
Get the Flash Player to see this player.
Demo File
#
# First we need to create the MFCOM Object
#
$mfapp = new-object -com MetaFrameCom.MetaFrameApplication
#
# To initialize we need to pass the app we want to accesss
#
$mfapp.Initialize(3,"Applications\Powershell")
#
# With Applications we need to load the data
#
$mfapp.loaddata(1)
#
# Lets see what we have
#
$mfapp | Get-Member -type Properties
#
# Lets look at Users and Groups
#
$mfapp | select Users,Groups
#
# How bout Servers
#
$mfapp.Servers | Select ServerName
#
# Sessions?
#
$mfApp.Sessions | ft SessionID,AppName,ClientAddress,ClientHRes,ClientVRes -auto
# First we need to create the MFCOM Object
#
$mfapp = new-object -com MetaFrameCom.MetaFrameApplication
#
# To initialize we need to pass the app we want to accesss
#
$mfapp.Initialize(3,"Applications\Powershell")
#
# With Applications we need to load the data
#
$mfapp.loaddata(1)
#
# Lets see what we have
#
$mfapp | Get-Member -type Properties
#
# Lets look at Users and Groups
#
$mfapp | select Users,Groups
#
# How bout Servers
#
$mfapp.Servers | Select ServerName
#
# Sessions?
#
$mfApp.Sessions | ft SessionID,AppName,ClientAddress,ClientHRes,ClientVRes -auto

Really enjoying these series, thanks!
When I run $mfapp | Get-Member -type Properties, I don’t return all the properties that you do. Why would that be?
What kind of farm do you have? XP, 3.0, 4.0, or 4.5?
Running from a PS Server or from a remote MFCOM machine?
This is a remote MFCOM computer against a 4.0 farm.
It is possibly because you are running remotely. What properties are you missing?
Are they there but just not filled out? Did you LoadData()?
Thanks for the reply.
When I run “$mfapp | Get-Member -type Properties” I get a list of properties but there are some listed in your video that I don’t see.
For example I don’t see:
AccessConditionFlag, AccessSessionConditions, Accounts2, Accountsvr, Addshortcutotclientdesktop, addtoclientstartmenu, allowanonymousconnections, allowremoteaccess, appprotocols, filetypes2, icofiledata, PNfolder, publishingflags, startmenufolder.
Probably missing a couple but that’s the general idea. This occurs regardless of the application I run against.