Monday, May 20, 2024
HomePowershellPowershell: Citrix Hypervisor Depend Operate

Powershell: Citrix Hypervisor Depend Operate


I’ve been hesitant to dive into Citrix Hypervisor PowerShell cmdlets, however there’s no rational purpose to not do it. Citrix continues to make nice strides in increasing and updating PowerShell for its hypervisor, PVS, and XenDesktop. Right this moment, we’ll go over a perform that queries an array of Citrix Hypervisor Poolmasters and returns the full VM depend on every. The concept behind this perform was to cease manually counting VM’s in XenCenter and to grasp VM development and Citrix Hypervisor Pool utilization.

NOTE: Because of The Scripting Frog for getting me many of the manner there with this perform.

The guide depend of VM’s

It might appear bizarre to make use of PowerShell to carry out queries of a Linux-based system, however such is the world we reside in. I bear in mind again in my day 🙂 Apple was a joke; IBM dominated the PC market and Linux didn’t exist. After all, I nonetheless bear in mind saving BASIC applications to a cassette deck.

Trash-80

The script will immediate for credentials which could be root or any Citrix Hypervisor administrator. You then join to every pool grasp in flip…

The vital flags are -SetDefaultSession and -NoWarnNewCertificates. You will need to set the default session on every new Citrix Hypervisor connection, in any other case, the script won’t know what pool grasp to question. The -NoWarnNewCertificates flag prevents a immediate asking you to simply accept the brand new Citrix Hypervisor certificates (you may go away this out if you would like this extra warning to let you understand you’re connecting to a brand new Citrix Hypervisor).

Except you may check with your XenServers with a DNS identify, you are able to do some fast translation to make your output extra readable. I’m utilizing a change assertion to exchange the IP deal with with a Citrix Hypervisor identify.

The remainder is simply getting all of the VM’s (minus snapshots, templates, and many others.), counting them and placing the outcomes right into a customized PowerShell Object. Lastly, you disconnect from every Citrix Hypervisor and go to the following one.

The outcomes…

Citrix Hypervisor VM Depend
XenServerPool1 108
XenServerPool2 109

I hope this submit encourages you to leverage the PowerShell instructions for Citrix Hypervisor. You’ll find the total perform on my GitHub web page.

Worth for Worth

For those who acquired any worth from studying this submit, please assist by turning into a supporter.

Thanks for Studying,
Alain Assaf

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments