13
Managing Citrix Farms Using MFCOM and Powershell

Managing Citrix Farms Using MFCOM and Powershell

Embed Size (px)

Citation preview

Page 1: Managing Citrix Farms Using MFCOM and Powershell

Managing Citrix FarmsManaging Citrix Farms

Using MFCOM and PowershellUsing MFCOM and Powershell

Page 2: Managing Citrix Farms Using MFCOM and Powershell

2© 2007 Citrix Systems, Inc. — All rights reserved

Introduction

• Vishal Ganeriwala

- Sr. Technical Manager, Citrix Systems Inc.

- http://community.citrix.com/blogs/citrite/vishalg

• Brandon Shell

- MVP https://mvp.support.microsoft.com/profile/Brandon

- Blogger: www.bsonposh.com

- Co-Author: http://www.gpanswers.com/books/

Page 3: Managing Citrix Farms Using MFCOM and Powershell

3© 2007 Citrix Systems, Inc. — All rights reserved

Overview

• Powershell Basics• Powershell Commands• Dealing with Objects• Helpful CMDLets to Learn Powershell

• How Does MFCOM Work?

• Using MFCOM to Manage Farms• Creating Farm Object• Looking at Farm Properties• Where to go from Here

Page 4: Managing Citrix Farms Using MFCOM and Powershell

4© 2007 Citrix Systems, Inc. — All rights reserved

Powershell Basics

• Powershell Commands• External Commands (i.e. ping.exe,ipconfig.exe, grep.exe)• CMDLets (i.e. Get-Member, Get-Command, Get-Process)• Functions• Scripts

• Get-Member

• Format-Table/List

• New-Object • ‘-ComObject’

Page 5: Managing Citrix Farms Using MFCOM and Powershell

5© 2007 Citrix Systems, Inc. — All rights reserved

Powershell Basics (cont)

• Dealing with Objects• Objects are things (i.e. Car)• Things you can get Info from (properties)• Things you can do stuff to (methods)• Properties like (Make, Model, Color)• Methods like (Start, Stop, Break)

• What is so great about using objects?• Filter on Properties without losing Everything else

• Get-Car | where{$_.Color –eq “Red”}

• Custom Output for My Needs• Get-Car | Format-Table Make,Color

• More practical Example• Get-Childitem (demo)

Page 6: Managing Citrix Farms Using MFCOM and Powershell

6© 2007 Citrix Systems, Inc. — All rights reserved

How Does MFCOM Work ?

MFCOM

IMA

LHC

DCOM

RPC

SAL

SAL

SAL

Data Store

Data Collector

Citrix XenApp Server

Windows Machine

SAL : Subsystem Access Layer

• PowerShell• VB Script• Perl

Page 7: Managing Citrix Farms Using MFCOM and Powershell

7© 2007 Citrix Systems, Inc. — All rights reserved

Common MFCOM Objects

Zones

Farm

Apps

Servers

Sessions

Policies

Servers

Users

Sessions

Apps

Processes

VCs

Page 8: Managing Citrix Farms Using MFCOM and Powershell

8© 2007 Citrix Systems, Inc. — All rights reserved

Using MFCOM to Manage Farms

• Creating MFCOM Objects in Powershell• $VarName = New-Object -com <MFCOM COM Name>

• Finding Properties• $VarName | Get-Member -MemberType Property

• Finding Method• $VarName | Get-Member -MemberType Method

• Example Getting Farm Object• $mfFarm = New-object –com “MetaframeCOM.MetaFrameFarm”• $mfFarm.Initialize(<int parameters>)

Page 9: Managing Citrix Farms Using MFCOM and Powershell

9© 2007 Citrix Systems, Inc. — All rights reserved

Getting More Farm Info

• FarmName• $mfFarm.FarmName

• Admins• $mfFarm.Admins

• Printers• $mfFarm.Printers

• Zones• $mfFarm.Zones

• Demo

Page 10: Managing Citrix Farms Using MFCOM and Powershell

10© 2007 Citrix Systems, Inc. — All rights reserved

Where to go from Here

• Getting Applications• $mfFarm.Applications

• Getting Servers • $mfFarm.Servers

• Getting Sessions• $mfFarm.Sessions

• Demo

Page 11: Managing Citrix Farms Using MFCOM and Powershell

11© 2007 Citrix Systems, Inc. — All rights reserved

Resources

• Top MFCOM and PowerShell Scripts

http://community.citrix.com/x/sgGVAQ

http://community.citrix.com/x/7gKVAQ

• Managing Multiple Farms using MFCOM SDK

http://community.citrix.com/x/IwAh

• CSEIT 2007 MFCOM Presentation

http://community.citrix.com/x/RIF0

• Dr SDK Webinar - What's new in MFCOM SDK 4.5

http://community.citrix.com/x/oIF0

Page 12: Managing Citrix Farms Using MFCOM and Powershell

12© 2007 Citrix Systems, Inc. — All rights reserved

Summary

• Realize the Power at your finger tips

• Hope you ENJOYED!

• More Resources

http://www.bsonposh.com

http://community.citrix.com/cdn/script-exchange/

http://www.powershellcommunity.org

Email Me: [email protected]

Page 13: Managing Citrix Farms Using MFCOM and Powershell

13© 2007 Citrix Systems, Inc. — All rights reserved