XenDesktop PoSH Module

Did you know that with the release of XD7 a new high level administrative PoSH module was introduced for the first time? Just like XDs regular PoSH snapins, this new module i.e. the aptly titled XenDesktop PowerShell module can be used to configure and administer an😄 site.

The supporting files for this new module can be found in the following location:

C:\Program Files\Citrix\XenDesktopPoshSdk\Module\Citrix.XenDesktop.Admin.V1\Citrix.XenDesktop.Admin

Note: The location above also includes two nice help files which explain the purpose of the new module and how the module can be used to carry out initial configuration of a Site.

Prior to XD7 we only used snapins to extend the shell but as Microsoft now recommends using modules over snapins (which are being depreciated) we need to follow suit and the new XenDesktop module is one of the first examples of this that I have come across.

So how do we interact with this new module? Basically all you have to do is load the module (It’s not loaded automatically when launching PoSH through Citrix Studio). Personally I prefer using a standalone instance of PoSH anyway and manually loading the😄 snapins so an extra manual step doesn’t really bother me. For all the crazy scripting dudes out there I suppose this is a moot point anyway…

So now that you know about this new PoSH module, go ahead and follow the simple steps below to view and load the new XenDesktop PoSH module:

Step 1: To view all the available PoSH modules on your system run the following command from within a PoSH window:

Get-Module -ListAvailable

 

Step 2: To import the XenDesktop module into the existing PoSH session, use the following string:

Import-Module -name Citrix.XenDesktop.Admin -verbose (the verbose switch just shows you what cmdlets are loaded)

 

Once loaded, check out some of the available cmdlets which can be used to configure and administer your😄 site…

One of the big advantages with using modules over snapins is that modules can contain PoSH commands in the form of cmdlets, functions and worksflows and can also contain variables, aliases and providers so that you can return the information stored in different parts of the database using one simple command rather then 2 or 3 seperate commands:

Example: Running Get-XDSite in XD7 returns information from the database that would normally only be retreivable using a couple of cmdlets:

Get-BrokerSite (Site Name, LicenseInformation)

Get-BrokerController (Controllers)

 

Best Regards
Mick Glover (aka😄 Tipster)
Senior Readiness Specialist, Worldwide Support Readiness [EMEA]
Citrix Systems, Inc.

http://blogs.citrix.com/2013/09/19/xd-tipster-introducing-the-new-xd7-xendesktop-posh-module/

Deixe uma resposta

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s