Blog posts tagged with 'sdk'
Yesterday, we released the Application Streaming Profiler SDK version 1.2, and it is now available as a free download.
This SDK allows creating applications or scripts that automate the management of streaming profiles. The API allows creating, updating, reseting and deleting profiles, and can be combined with automatic starts of unattended installers. Without this SDK, these tasks could only be done through the Streaming Profiler user interface and would require the physical presence and monitoring of an administrator.
Here follow a list of improvements in this second release of the SDK:
- New APIs for Inter-Isolation Communication profiles: The New IRADEPackage2 classes include support for defining links between profiles.
- Includes the TLB file that allows the easy creation of COM client applications with C++.
- Includes and explains multiple working samples in both C# and C++.
- The files included in this SDK are better organized for easy navigation.
For more information about Application Streaming see the product documentation or search for "Application Streaming" on the Citrix Blogs, and for detailed questions about the SDK, visit the dedicated Community Forum. Also, keep monitoring the Citrix Blogs because Joe Nord, our Product Architect for Application Streaming, will soon post entries to further explain the Streaming Profiler, the SDK, and this release.
Very important: we want to know about your experience with this SDK:
- Have you been able to use the SDK effectively?
- What else would you like to see in the SDK?
Lastly, XenApp 5.0 was announced earlier this week. If you want to learn more about it, you should not miss Citrix Delivery Center Live. This live virtual event will take place on September 9th. Make sure to register now!
We have just released the XenApp Management SDK (MFCOM) for XenApp 5.0, and it is now available as a free download.
This SDK allows creating programs or scripts that automate the management of XenApp. Examples of use for this SDK range from simple scripts to the implementation of full-fledge custom consoles for fully managing a XenApp deployment.
This release of the SDK adds support for Health Monitoring and Recovery, for reboot schedules, and for session policies. For additional details see the SDK and the XenApp documentation. You can also visit the very active Community Forum for this SDK.
XenApp 5.0 was announced earlier this week. If you want to learn more about it, you should not miss Citrix Delivery Center Live. This live virtual event will take place on September 9th. Make sure to register now!
Microsoft Windows PowerShell command line shell and scripting language helps IT professionals achieve greater control and productivity. Using a new admin-focused scripting language, more than 130 standard command line tools, and consistent syntax and utilities, Windows PowerShell allows IT professionals to control system administration and accelerate automation more easily
With PowerShell, Citrix Administrators can script MFCom Objects to manage and administer the XenApp Farm. The secret of using COM objects starts with the command: New-Object -COM.
The following PowerShell example creates a new MetaFrame object (do not get confused with the COM Object naming), initializes the Farm and prints out the farmname:
$farm = new-Object -com "MetaframeCOM.MetaframeFarm"
$farm.Initialize(1)
$farm.FarmName
It's not going to be a spectacular script. But look at the following little code enhancement:
$farm = new-Object -com "MetaframeCOM.MetaframeFarm"
$farm.Initialize(1)
$farm.FarmName
$farm.sessions | Format-Table UserName,ClientAddress
Just adding one more lines of code and you will get all sessions within the farm displaying the Username and IP Address.
Setting up your PowerShell / MFCom environment
Beginning with PowerShell / MFCom Scripting you should install Microsoft Powershell on a Citrix Presentation / XenApp Server in your lab. I recommend downloading the PowerShell Graphical Helpfile which also provides great information's about VBScript to PowerShell conversion.
For creating and editing your PowerShell scripts I suggest downloading the free PowerGui graphical user interface and script editor. Its easy to use and works well with COM Objects.
PowerShell
http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx
PowerShell Graphical Help File
http://www.microsoft.com/downloads/details.aspx?FamilyId=3B3F7CE4-43EA-4A21-90CC-966A7FC6C6E8&displaylang=en
PowerGui - Graphical user interface and script editor
http://www.powergui.org

Displaying apps in your farm
To give you some basic ideas where PowerShell leverages your daily administrative tasks, I've created the following script:
$farm = new-Object -com "MetaframeCOM.MetaframeFarm"
$farm.Initialize(1)
$farm.FarmName
$farm.applications| where {$_.BrowserName -like "Winword*" {color:black}} | select DistinguishedName
The script above enumerates each application published in the farm and selects all applications where Winword* is contained in the BrowserName.
PowerShell Examples provided by CDN
PowerShell and other scripting examples can be found on the Citrix Developer Network:
We have recently released an update for the Health Monitoring & Recovery SDK, and it is now available for download.
The popularity of the Health Monitoring & Recovery (HMR) feature, included with XenApp 4.5 Platinum and Enterprise editions, has greatly increased during the last few months among Citrix customers. This feature monitors the health of XenApp by periodically executing multiple tests and by starting a recovery action if any of those tests fails.
Citrix provides multiple HMR tests out-of-the-box for the administrators to configure, but customers and third parties can use this SDK to develop additional tests.
Some of the improvements in this update of the SDK include:
- Improved error handling.
- Support for additional test formats.
- Additional sample tests.
- Support for Windows Server 2008.
We are planning a future video blog regarding HMR in general and about the SDK in particular. So, stay tuned!
In the mean time, you can check the Citrix Presentation Server Administrator's Guide or a prior posting about the feature for more information.
Enjoy!
Aureliano Lopez-Martin
Senior Product Manager, XenApp SDKs
Windows PowerShell is an extensible command line interface shell and associated scripting language from Microsoft. To implement you own specialist functions you can use cmdlets for enhancing PowerShell. Cmdlets are specialized .NET classes, which the PowerShell runtime instantiates and invokes when they are run.
For building your own cmdlets I've found C# and VB.NET cmdlet Templates in the web. http://channel9.msdn.com/ShowPost.aspx?PostID=256835.
(Extract the ZIP File and you should find 2 vsi files. One for C# and one for VB.NET. They are working well with Visual Studio 2008.)
If you now go to Visual Studio and create a new project select Windows Powershell Template as the project template.

Right-click your project and choose, add then New Item. From the list of items choose Windows PowerShell PSCmdlet. This should be the default choice for cmdlets.
Microsoft describes how to extend Windows PowerShell with custom commands in the following MSDN article.
http://msdn.microsoft.com/msdnmag/issues/07/12/PowerShell/default.aspx?loc=en
After building our solution we need to install assembly with the InstallUtil tool. Open a Visual Studio cmd prompt, navigate to the bin\debug folder of your solution and run:
InstallUtil yourassemblyname.dll
Next load Windows PowerShell and type:
Get-PSSnapIn -registered
(which should list your snapin along with any other snapins currently registered.)
Next enter:
Add-PSSnapIn yoursnapinname
(this will load your snapin)
You should now be able to call your new functions in PowerShell.
In the next couple of weeks (if I will have time) I'd like to develop a cmdlet which allows you to do basic operation tasks within a Citrix Presentation Server or XenApp farm. Things like: list all sessions, get farm name, logoff idle session, etc.
Have fun
Christian