Skip to content

Home

Looking back at 2018 and into 2019

Hi all,

I just came back to my blog after a really busy second half of 2018 at work and in my private life. I can’t believe that I haven’t posted anything on my own blog since March 🙁 I have held a webinar and posted some on mycugc.org instead, but I really want 2019 to also be the year where this blog will become more active. I will make sure that any blogs I post on other sites will be posted here as well after a few weeks on the primary site of the blog post.

Citrix PVS and PowerShell

Hi all

Today’s post is about Citrix PVS (PVS) and Powershell. This combination has been a pretty awful experience for a long time, but now things a looking up. Since PVS version 7.1x where Citrix released a Powershell module instead of MCLI commands we have been able to use some real powershell commands and logic. In this article I will show you how to do commen PVS task with powershell.

XenServer documentation script

Hi all,

Just before new years I uploaded my XenServer documentation script to GitHub, you can find it here:

In this post I will go through how to use the script and how to report any feedback to me. I also want to do a huge shoutout to Iain Brighton for making the PScribo module which is just awesome for report making!

  1. Download the code from here: https://github.com/mracket/XenServer-DocumentationScript/archive/master.zip
  2. Download PScribo from here: https://github.com/iainbrighton/PScribo/archive/dev.zip
  3. Download PowerShell SDK for XenServer here: https://www.citrix.com/downloads/xenserver/product-software/xenserver-73-standard-edition.html
  4. Place the PScribo and XenServer SDK module in the PowerShell modules folderPowerShellModulesFolder
  5. Set your PowerShell execution policy for unrestricted while running the script, this can be done with the following command while you are in PowerShell commandline as administrator “Set-ExecutionPolicy Unrestricted”. If you don’t know which execution policy you have running you can see it with this command “Get-ExecutionPolicy” PowerShellExecutionPolicy
  6. While running the PowerShell commandline change to the folder where you placed the downloaded script and run the script like this “.\New-XenServerReport.ps1 -PoolMasterIP 10.10.10.10 -UserName root -Password Password -ReportFormat html -Verbose”. Remember to change the values to fit your environment. The parameters supports tab-complete. Also remember that you can add more pools at the same time by just adding poolmasters like this -PoolMaster “10.10.10.10”,”10.10.10.20″,”10.10.10.30″
  7. The script will output the poolmaster that it is working on and return to the prompt when done. ScriptComplete.png
  8. The report will be placed on your desktop (I will add a paramter to this later on) and you can then open it with your favorite browser, word or text editor depending on which output format you selected.
  9. A report will look like this: XenServerReport.png
  10. Remember to set back your PowerShell execution policy to what you had before running the script

I hope you can use this script for your environments and if you have any enhancements you want in the script let me know. You are also more than welcome to provide any other feedback and bugs to me via twitter @mracket or the GitHub page https://github.com/mracket/XenServer-DocumentationScript/issues

/Martin