Using MFCOM on XenApp
We can use PowerShell to call MFCOM objects on XenApp 5.0 farms or older versions. This is useful when we want to use PowerShell to manage multiple versions of XenApp farms or migrate data from previous versions of XenApp.
The following is a simple example of how to call an MFCOM object, inside a PowerShell script. The script shows the XenApp farm name on a XenApp 5.0 or earlier version. This example will fail in XenApp 6.5 (and XenApp 6.0):
$CtxXA = New-Object -ComObject "MetaFrameCOM.MetaFrameFarm" $CtxXA.Initialize(1) $CtxXA.FarmName