Scripting. Powershell, VMware, Windows, Active Directory & Exchange. All that kind of stuff…..
RSS icon Email icon Home icon
  • What’s New in PowerCLI 5.0 – UK PowerShell User Group 22nd November

    Posted on November 18th, 2011 Jonathan Medd No comments

    A quick post to let you know that I shall be presenting for an online meeting of the UK PowerShell User Group on the topic of ‘What’s New in PowerCLI 5.0′ at 21.00 GMT on Tuesday November 22nd.

    Details on how to join in are available from Richard Siddaway’s website.

    Hope you can join us.

  • PowerCLI Drop In Area at the UK National VMUG November 3rd

    Posted on October 26th, 2011 Jonathan Medd No comments

    There are a lot of great reasons to sign up for the UK National VMUG on November 3rd 2011, full details are below.

    One reason to highlight is that during the day, Alan Renouf and I will be staffing the PowerCLI Drop In Area. We’re currently finalising the details, but this will likely consist of pre-prepared PowerCLI lab content for you to work through and also an opportunity to ask PowerCLI or PowerShell questions. We’ll be there throughout the day so there should be plenty of time for us to help you out with them.

    Sign up here

    Look forward to seeing you there :-)

    ——————————————————————————————————————————————————-

    This event will feature:

    • Wednesday night pre-event networking reception beginning at 7:00 p.m. at National Motorcycle Museum – hosted by Veeam Software
    • Keynote with Joe Baguley – VMware Chief Cloud Technologist
    • Exhibitor area with:
      • VMware partners
      • PowerCLI Drop In Area
      • Expert Bar

    Meeting Agenda

    8:00 AM Registration
    Breakfast, Mingle with Vendors
    8:30 – 9:00 AM VMUG Introduction and Wecome from VMUG Steering Committee
    9:00 -  10:00 AM Keynote
    Joe Baguley – VMware Chief Cloud Technologist
    10:00 – 10:15 AM Break, Mingle with Vendors
    10:15 – 11:00 AM Partner Sessions
    Hitachi Data Systems
    Accelerating your Cloud Infrastructure
    Symantec
    Backup Exec and VMware: Best Practices
    Xangati
    Blame Wars: The VI Admin Strikes Back
    Actifio
    Virtualization comes to Data Management
    11:00 – 11:15 AM Break, Mingle with Vendors
    11:15 AM – 12:00 PM Community Sessions
    Duncan Epping/Frank Denneman – vSphere 5.0 Clustering Q&A Cormac Hogan vSphere 5.0 New Storage Features Dan Watson Security in the Virtual World Julian Wood  vSphere 4->5 upgrade
    12:15 – 1:00 PM Lunch, Mingle with Vendors
    1:00 – 1:45 PM Partner Sessions
    Xsigo
    Under the Hood with Virtual I/O Technology, and How VMware Uses It to Do More
    Veeam
    Virtualization Data Protection, It’s Not Niche Anymore
    Arista Networks
    Integrating Private and Public Clouds with Real World Networks
    1:45 – 2:00 PM Break, Mingle with Vendors
    2:00 – 2:45 PM Community Session
    Duncan Epping/Frank Denneman – vSphere 5.0 Clustering Q&A Cormac Hogan vSphere 5.0 New Storage Features Dan Watson Security in the Virtual World Simon Gallagher vTardis
    2:45 – 3:00 PM Break, Mingle with Vendors
    3:00 – 3:45 PM Partner Sessions
    Coraid
    Server Virtualization Demands a New Storage Architecture
    CommVault
    Protecting and Managing Data in Growing VMware Environments
    Embotics
    Live Demonstration: Transforming Private Cloud Hype to Private Cloud Doing
    3:45 – 4:15 PM Mike Laverick – Cloud Journey – Bumps in the Road
    4:15 – 4:30 PM Wrap-up & Prize Drawing

     

  • PowerCLI-Man at VMworld Europe

    Posted on October 5th, 2011 Jonathan Medd No comments

    If you are not already aware of the phenomenon that is PowerCLI-Man, well, where have you been? My sources tell me he may be making an appearance at VMworld Europe, so if you are not already going, I highly recommend you attend. In particular I would encourage you to attend VSP1882 or VSP1883 for your best chance to see him………

     

    PowerCLI @ VMworld Europe from Alan Renouf on Vimeo.

     

  • Time for a change: Let’s go!

    Posted on September 6th, 2011 Jonathan Medd 1 comment

    I have really enjoyed  my time at my current employer, there are some amazingly talented people who work / have worked there during the time I have spent there. However, for various reasons I have decided that it is time to move on and try something different by going freelance contracting. So while I work out my notice period I will be looking for a contract as my next opportunity.

    Think about hiring me because of the following:

    Achievements:

    Key Skills:

    • VMware vSphere 4.1, 4.0 and ESX 3.5 – 4 years
    • PowerShell / PowerCLI Scripting – 4 years
    • Windows Server 2008 R2, 2008, 2003, 2000 and NT4(!)  – 14 years
    • Citrix XenApp 5.0, 4.5 and 4.0 – 3 years
    • Active Directory and Exchange Migrations – 14 years

    Highlight Projects:

    • Virtualising Tier 1 Apps, including Citrix, Exchange, Sharepoint, Active Directory, SQL and SAP bringing significant cost savings and greater flexibility to the business.
    • Automating virtualised environments with PowerCLI and PowerShell, saving time and money in operational costs.
    • Moving virtualised environments to new datacentres with little or no downtime.
    • Migrating through the versions of vSphere, from ESX 3.5 through ESXi 4.1.
    • Implementing procedures around virtualisation to bring business benefits.
    • Large scale P2V projects with subsequent big reductions in power, cooling and hardware requirements.

    Certifications:

    • VMware Certified Professional (VCP) 4.0 and 3.5
    • Microsoft MCITP: Enterprise Administrator Windows Server 2008
    • Microsoft MCSE – Windows 2003, 2000 and NT 4
    • Citrix Certified Administrator (CCA) for Citrix XenApp5

    So if you might be interested in taking me on for a contract based on these skills and experience, and the occasional ability to make people laugh, then you can contact me either via:

    View Jonathan Medd's profile on LinkedIn

    or

    .

  • Download the PowerCLI 5.0 Poster

    Posted on September 5th, 2011 Jonathan Medd No comments

    The PowerCLI team publish very handy reference posters that will sit nicely by your desk and usually release a new version to accompany each product release. vSphere 5 is no different and if you weren’t lucky enough to attend the recent VMworld and collect a tangible copy then you can now download one to print out yourself.

  • Using PowerCLI VIProperties and the VIProperty Module

    Posted on August 18th, 2011 Jonathan Medd No comments

    In PowerShell it is possible to use custom properties for an object if the one you need does not exist by default – these are known as calculated properties.

    For instance, in PowerCLI by default there is no ToolsVersion property for a VM, however we can create a calculated property named ToolsVersion and submit an expression to retrieve that data:

    
    Get-VM TEST01 | Select-Object Name,@{Name="ToolsVersion";Expression={$_.ExtensionData.Config.Tools.ToolsVersion}}
    

    However, the ToolsVersion property does not persist after running this command, so if I now try:

    
    Get-VM TEST01 | Select-Object Name,ToolsVersion
    

    The ToolsVersion is not returned since PowerShell is not aware of that property. I would need to specify the expression again if I wanted to use it.

    PowerCLI 4.1 introduced the new cmdlet New-VIProperty which allows you to create custom properties for an object. However, these properties will persist for the course of the current PowerShell session. Using the same example as above we can create a ToolsVersion property like this:

    
    New-VIProperty -Name ToolsVersion -ObjectType VirtualMachine  -ValueFromExtensionProperty 'config.tools.ToolsVersion’ -Force
    

    So now I can run this query and this time I will get the results I was hoping for:

    
    Get-VM TEST01 | Select-Object Name,ToolsVersion
    

    The possibilities for using  New-VIProperty are almost limitless. Luc Dekens has done a great job of collating a large set of community efforts of these on his VIProperties page . I have been using them a lot recently, either those already submitted, or creating my own, but was finding it frustrating copy / pasting each one in as and when required.

    So instead I decided to put them all into a PowerShell module so that each of them would be potentially available at any time, simply by importing the module. A PowerShell module can be as simple as a collection of functions or scripts that are bundled up together and then imported to make them available for use.

    I sent this to Luc, he thought it was a good idea too. So after tidying it up a bit, you can now download it from his site . Once downloaded and before unzipping the files, make sure to unblock the content before extracting it, otherwise you will have an issue when importing the module, dependent on your current PowerShell Execution policy:

    Copy the extracted VIProperty folder to your PowerShell modules location – you can find this with:

    
    $env:PSModulePath
    

    Now you can make all of those VIProperties available by importing the module:

    
    Import-Module -Name VIProperty
    

    For instance I could combine some standard (Name, NumCPU) and custom properties (BootDelay,NumVirtualDisks) from the module  in this query:

    
    Get-VM Test01 | Select-Object Name,NumCPU,BootDelay,NumVirtualDisks
    

    I highly recommend PowerCLI users check this out and please help make the module even more useful by submitting your own custom properties to Luc for inclusion.

  • PowerCLI Book Competition on Planet VM

    Posted on August 15th, 2011 Jonathan Medd No comments

    VMware vExpert and general virtualisation legend Tom Howarth has very kindly decided to give away an additional copy of VMware vSphere PowerCLI Reference that he has spare. All you need to do to be in with a chance of winning is submit a PowerShell based script via Tom’s site and I will pick a winner to receive the book. Full details from Planet VM:

    ———————————————————————————————————————————————–

     

    I’ve received a copy of VMware vSphere PowerCLI Reference as a review copy, but I have already purchased one.  So I have one to give away.

    At the last London VMUG I was speaking to Jonathan Medd one of the authors, and he suggested that I organise a competition for the thing the winner receives my spare copy of the Book.  So I thought that a PowerShell competition would be a nice way of sorting out the winners, but then with my level of programming / scripting skills (think have difficulty to create “Hello World”) I would not be able to tell a good script from a shopping list for Tesco’s (or if American “Walmarts”)

     

    This is when the Jonathan jumped in to the rescue and said he would judge it.  Well I thought WOW.

    So here is the rub,  Do you want a free copy of VMware vSphere PowerCLI Reference, well then write a PoSH script that Mr Medd likes and its yours.

    To enter the competition simply upload your script to the following location

    SCRIPT COMPETITION

    You will have until the beginning of VMworld Vegas to upload your scripts and the winner will be announced on the 5th September.

    Note,  LucD, Alan Renouf, et all will be disqualified, to allow us mere mortals a chance :D

  • Add Host to vCenter Fails With ‘The name “hostname” already exists.’

    Posted on August 4th, 2011 Jonathan Medd No comments

    Recently a colleague had an issue where they were unable to add a newly built ESXi 4.1 server to vCenter; it failed with the message ‘The name “hostname” already exists.’ However, at first glance in vCenter the hostname didn’t exist.

    The vCenter vpxd log contained more info, an error below:

    Found host with duplicate IP x.x.x.x: host-xxxxx

    You can track down the hostname from the host-xxxxx info with PowerCLI

    
    Get-VMHost | Where-Object {$_.id -eq 'HostSystem-host-xxxxx'} | Format-Table Name,ID
    

    Once you have the hostname, track it down in the Host table in the vCenter database and examine the IP address recorded. In this case the IP address in the database did not match the IP address of the Management Network of the ESXi host in vCenter.

    Turned out the host had been built from a DHCP address, given a static IP after being taken to a remote site, but not removed from vCenter before the IP change. Removing the host from vCenter and adding back in resolved the issue.

  • PowerCLI Book: Kindle Version Available Again!

    Posted on July 20th, 2011 Jonathan Medd No comments

    KindleThe question that we have been asked the most since the PowerCLI book was published is “When is the Kindle version going to be available?” As you may or may not be aware it was briefly available back in April, but there was an issue with the formatting of the code which meant that it had to be pulled and corrected. Whilst we were initially told that it would be a 1 – 2 week wait to be corrected, due to other issues the publisher was experiencing with Kindle versions in general, it has taken until now for it to be made available again. However, the book is now back in Kindle stores and the code issue has been corrected.

    The question we have been asked the second most was back in April, “Why is the Kindle version more expensive than the paperback?”. At the time we went back and forth with both the publisher and Amazon and received conflicting answers. Well now that is back in the various Kindle stores again, this situation also seems to have improved and typically it is slightly less than the paperback in price. (In April on Amazon UK the Kindle version was £10 more expensive than the paperback)

    ——————–  Kindle     Paperback

    Amazon US            $27.65 $31.45

    Amazon UK           £17.22 £19.13

    Amazon Germany     €28.72 €38.30

    We apologise for the length of time to get this back into Kindle, but hope you will be pleased it is finally ready!

  • PowerCLI: Exception of type ‘System.OutOfMemoryException’ was thrown

    Posted on July 18th, 2011 Jonathan Medd 1 comment

    When working with PowerCLI in a large environment and retrieving large amounts of data, particularly when using the Get-View cmdlet, you may receive the following error: Get-View    Exception of type ‘System.OutOfMemoryException’ was thrown

    Looking at the available memory on your system may cause you to wonder why you receive this error message. It may occur because you are running the 32-bit version of PowerCLI where the size of the heap is limited to 1.5 GB. Try running the same command or script on a 64-bit system, which should resolve the issue.