New PVS Farm Check SBA

Based on the new PowerShell CMDlets for Citrix Provisioning services

After much tireless lobbying from CTP’s, particularly from Carl Webster, Citrix have spent the time to convert the old soap / text based PowerShell cmdlets (which were just a wrapper for the mcli command line) to true object based PowerShell cmdlets, complete with help and examples!

Not broadly announced or celebrated, these commands were slipped into the Citrix Provisioning services 7.7 release and maintained in version 7.8. In typical Citrix fashion, these CMDlets are included in a PSSnapin, as opposed to a module, but hey, beggars can’t be choosers!

The documentation can be tricky to locate, but once you find it, you’re up and running after a little reading and testing.
To cut down on your reading and PDF browsing, the setup is quite simple:

  • Install the PVS console for 7.7 or 7.8 on a device or the PVS server directly.
  • Install the PowerShell Snapin utilising the InstallUtil.exe binary provided by the .Net framework.
  • Import the Snapin and point it at a provisioning server.

 

Importing and using the Snapin (step by step):

Once you’ve installed the console, the specific command to run to install the module is as follows:

%systemroot%Microsoft.NETFramework64v4.0.30319installutil.exe Citrix.PVS.SnapIn.dll

Once complete, fire up powershell and import the SnapIn:

Once registered, a quick get-command -module citrix.pvs.snapin will give you all the commands you could possibly desire!

So now that we have true object based Cmdlets, wouldn’t it be cool to write an all-encompassing script based action to report the health of a Citrix Provisioning Services environment!

 

So what can we do with it?

I sat down recently, to write a high level report of the health of a Provisioning services environment using these new cmdlets and add them to ControlUp as a script based actions, this report will show the health of the:

  • Sites
  • Collections
  • Servers
  • vDisks
  • Servers
  • Devices
  • And stores!

To make it even easier, the script will also perform all the pre tasks like installing and registering the snapin where required!

The Script is simple stuff, install the script based action and run it against your provisioning services server via ControlUp.

Then wait for the report to come back automagically!

The PowerShell cmdlets are hugely powerful and I’ve only really scratched the surface with this script based action, but hopefully this blog shows you what you can do when you combine these Citrix Provisioning Services libraries with the power of ControlUp script based actions!