Hands off my gold image! – Video: Windows 8 zero-touch deployment

Here’s another demo that I showed during my Geek Speak Live session at Citrix Synergy 2013 at Anaheim yesterday.

In a 45 minute session on MDT and automating gold image deployments there’s not enough time for such a large topic, so perhaps I should have dropped this one; however this is interesting nonetheless. Using PowerShell to drive Hyper-V and MDT, this demo shows a full Windows 8 deployment from start to ready for user logon. This approach might be useful for persistent virtual desktops, or with a little more effort, using the image in a XenDesktop 7 desktop catalog created with PowerShell.

The video is available in HD resolution (720) so you can see the full details.

Hands off my gold image! – Video: automated PVS image deploy and capture

Thanks to everyone who attended my Geek Speak Live session at Citrix Synergy 2013 in Anaheim yesterday. I’ll post details about the session and the slide deck next week for those who couldn’t attend.

In the mean time, here’s one of the demos that I ran during the session that shows using the Microsoft Deployment Toolkit to deploy WIndows 7 to a target VM and then capture that image into a PVS vDisk, completely hands free (apart from kicking the deployment off, of course).

The video is available in HD resolution (720) so you can see the full details.

Take part in the OS Deployment Automation Survey

RustyGears

At Citrix Synergy in Anaheim next month, I’ll have the opportunity to present a Geek Speak Live session – Hands Off My Gold Image! If you aren’t automating the creation of your gold images, there’s lots to learn in this session. Even if you are automating your gold images, perhaps there’s something new that I can still share with you. In this session, which will be demo heavy, I’ll show you some ways that you can deliver build automation with toolsets provided by Microsoft and Citrix.

I’m big on automation, especially when it comes to gold images. If you’re building images via a manual process, I contend that you cannot deliver the quality and consistency that is provided through an automated process. PVS, MCS/linked clones etc. are not a replacement for automation either. An open and repeatable build process improves the user experience and reduces the cost of support, because Windows is no longer a black box. Instead the entire process from start to finish, can be viewed, interrogated and understood by everyone.

In my role at Kelway, I get to talk many customers about how to better deliver and manage their physical and virtual desktop environments, but it’s still surprising to me that often automation is an afterthought.

So for this talk, I wanted to provide more than just anecdotal evidence, I’d like to back up my approach with some real data. That’s where I need 60 seconds of your time to contribute to a survey. Here’s a 5 question, anonymous survey designed to gather some details on OS automation in hosted desktop environments:

This survey will be available until at least Synergy in May, where I’ll present the results during my talk - Hands Off My Gold Image!

400 App-V Recipes!

400-episodes

With thanks to Nicke’s latest post, the App-V Recipes and Tips list has hit 400 links!

If you haven’t seen this list previously, this is the place to find recipes, tips, workaround and fixes for various applications that the community has built around Microsoft App-V. A big thanks to all those community members who have contributed to this list and shared their knowledge.

If you’d like to keep up to date, as links are added, there’s an RSS feed for the list, and the list itself is searchable (here’s an example for Firefox recipes).

Here’s to the next 400.

Retrieving a VM’s UUID from vSphere

While working on a PowerShell script to drive OS deployment through MDT, I’ve needed to obtain the UUID from a target virtual machine. Unfortunately this isn’t just a property of the VM that you get through Get-VM. Instead you’ll need jump through a few hoops to retrieve the right UUID.

I’ve haven’t had to re-invent the wheel on this one, as I’ve taken some tips from this VMware Community thread and a blog post by Ken Smith. I have simplified things a little by writing a function that you can use to return the UUID as a string from a virtual machine object (gathered from Get-VM) to the function.

To use the function, first ensure that PowerCLI is installed and that you’ve connected to a host or vCenter, so that a target VM can be returned and then passed to the function.

For example, I could use the following command to retrieve the UUID from a target VM:

PS C:\> Get-VM -VM "W7VM1" | Get-vSphereVMUUID
554c0342-c2c7-c3b7-8258-96eb00f62b0c

Code listing below:

#---------------------------------------------------------------------------
# Author: Aaron Parker
# Desc:   Function that uses retrieves the UUID from a specified VM and
#         transposes it into the right format for use with MDT/SCCM etc
# Date:   Mar 24, 2013
# Site:   http://stealthpuppy.com
#
# Original code snippets from:
# http://communities.vmware.com/thread/239735
# http://www.keithsmithonline.com/2013/02/powershell-show-vmware-vm-UUID.html
#---------------------------------------------------------------------------

Function Get-vSphereVMUUID {
    <#
        .SYNOPSIS
            Retrieves the UUID from a specified VM and formats it correctly for use with MDT/SCCM etc.

        .DESCRIPTION
            Retrieves the UUID from a specified VM and formats it correctly for use with MDT/SCCM etc. Returns the UUID as a string that can be passed to other functions.

            Requires that a VM object is passed to the function. That object will first have to be created before being passed to this function.

        .PARAMETER VM
            Specifies the VM to retrieve the UUID from.

        .EXAMPLE
            PS C:\> Get-vSphereVMUUID -VM "W7VM1"

            Retrieves the UUID from a VM named W7VM1.

        .EXAMPLE
            PS C:\> $VM | Get-vSphereVMUUID

            Retrieves the UUID from a VM piped to this function.

        .NOTES
            See http://stealthpuppy.com/ for support information.

        .LINK

http://stealthpuppy.com/code/retrieving-a-vms-uuid-from-vsphere/

     #>

    [CmdletBinding(SupportsShouldProcess=$True)]
    Param(
        [Parameter(Mandatory=$True, ValueFromPipeline=$True, HelpMessage="Specify the VM to retrive the UUID from.")]
        [System.Object]$VM
        )

    BEGIN {
    }

    PROCESS {
        # Retrive UUID from vSphere
        $UUID = $VM | %{(Get-View $_.Id).config.UUID}

        #Transpose UUID into expected format
        # Section 1
        $UUID11 = $UUID.Substring(0,2)
        $UUID12 = $UUID.Substring(2,2)
        $UUID13 = $UUID.Substring(4,2)
        $UUID14 = $UUID.Substring(6,2)

        # Section 2
        $UUID21 = $UUID.Substring(9,2)
        $UUID22 = $UUID.Substring(11,2)

        # Section 3
        $UUID31 = $UUID.Substring(14,2)
        $UUID32 = $UUID.Substring(16,2)

        # Section 4
        $UUID41 = $UUID.Substring(19,4)

        # Section 5
        $UUID51 = $UUID.Substring(24,12)

        # Piece the strings together
        [string]$UUIDa = "$UUID14$UUID13$UUID12$UUID11"
        [string]$UUIDb = "$UUID22$UUID21"
        [string]$UUIDc = "$UUID32$UUID31"
        [string]$UUIDd = "$UUID41"
        [string]$UUIDe = "$UUID51"
        [string]$UUIDfixed = "$UUIDa-$UUIDb-$UUIDc-$UUIDd-$UUIDe"
    }

    END {
        # Return the UUID
        Return $UUIDfixed
    }
}