Installing and configuring PowerCLI

Posted: 21st September 2011 by neil in Powershell, VCAP-DCA

In this article i am going to go over the steps to install and configure PowerCLI to run on my virtual center server. This will enable me to interrogate all the virtual machines and VMware environment by using Powershell.

1) The first step is to download Powershell v2.0 from Microsoft. Note this is only applicable if you are using Server 2003 or earlier. Powershell comes built into Server 2008 and Server 2008 R2. If you are running 2003 you can download it from here

2) Once you had downloaded and installed Powershell 2.0 you are then ready to download PowerCLI. If you go VMware.com and search for PowerCLI it should bring you to the download page. The version i have downloaded is PowerCLI v4.1.1. 

3) Once you have run the installation you will get a pop up box saying “This installation of VMware vSphere PowerCLI requires an additional component, “VMware VIX”, which will be installed automatically” You can just press OK to continue

4) Next you will see a screen pop up which mentions the Powershell execution policy. By default the Powershell installation is really locked down so you have to enable it to run your own scripts. To do this all you have to do is open up a powershell console and execute “Set-ExecutionPolicy RemoteSigned”

image

5) Now you have a few things to go through, just select next and accept the defaults (unless you want to change them of course!!) When the installation completes you should have 2 icons on your desktop for PowerCLI.  If you select one of them the PowerCLI menu will load up but there will be an error

image

This is because of what i mentioned in Step 4 so if you perform that command and reload you should be good to go

imageimage

6) OK so now you have your PowerCLI installed, what now? Next we have to connect to the vcenter web services. This step will enable us to start interrogating the environment. To do this we issue the following command:

connect-viserver -server virtualcenter -protocol http -user testlab\administrator  (obviously replacing virtualcenter with your vcenter server name)

imageimage

Once that connects successfully you should then be able to start issuing commands. As a test you can see i issued get-vm which recalls all the virtual machines in my environment.

Till next time!

XenDesktop 5 SP1 Licence problems

Posted: 10th July 2011 by neil in Citrix XenDesktop

Recently encountered a problem where i had installed XenDesktop 5 SP1 and when i tried to point to the licence server i received the following error:

“The License server found at this address can not be used for this version of XenDesktop”

This threw me a bit as the environment i was working in had a full platinum licence so there should not of been any problems. The solution to this problem luckily is quite an easy one. It seems that to licence XenDesktop 5 SP1 you must be running the latest version of Citrix Licence server which at this moment in time is version 11.9.  As soon as i installed that i was able to register with the licence server ok.

You can download the latest version from here: https://www.citrix.com/English/SS/downloads/details.asp?dID=1349861&downloadID=2311724&pID=1679389 (you will need a Citrix account to access the download)

Netapp vfilers & Quest Storage Manager

Posted: 31st May 2011 by neil in Storage

Hello,

In this post I am going to describe a recent problem that we encountered with using Quest Storage Manager on our NetApp vfiler.  The problem is that Quest Storage Manager tries to automatically create and write a licence file up to \\vfiler\c$\programme files\quest. The problem is that on a vfiler the c$ is not a writeable area so the licence installation fails and you are unable to use it to manage data on your vfiler.

Fortunately, the solution is nice and simple. All you have to do is simply delete the c$ CIFS share and recreate it again, pointing to the volume that you want to manage. We were not sure if there were any side affects with doing this but so far we have not encountered any problems after the change has been implemented.