So tonight I was playing around with deployment at home. Having tried both System Center Essentials and System Center Configuration Manager, it was time for another deployment solution. Since my company has a sister company specializing in system management software, I decided to give them a try. After installing I needed to find the netboot GUID since I didn’t really like using the mac address. So how do I get the netboot GUID of my Hyper-V virtual machines? Well powershell of course.

The powershell snippet:

$VMs = Get-CimInstance -Namespace root\virtualization\v2 -Class Msvm_ComputerSystem|
  Where-Object {$_.Caption -eq 'Virtual Machine'}
ForEach ($vm in $VMs)
 {
   $biosguid=Get-CimInstance -Namespace root\virtualization\v2 -class Msvm_VirtualSystemSettingData |
     Where-Object {$_.VirtualSystemIdentifier -eq $vm.Name}|
     Select-Object -ExpandProperty BIOSGUID
   $vm | Select @{label='Name';expression={$vm.ElementName}},
     @{label='netbootGUID';expression={$biosguid}}
 }
Name netbootGUID
local.file.file01 {1FB64C6F-8B3E-43E0-9BAA-5DC453D14AC3}
local.file.file07 {4103D9E5-1AA8-4777-9CA1-9E50CADC403F}
local.file.file05 {0312C3A1-EA42-4B87-A106-2D5E97218544}
local.file.file02 {52AC9616-E0D4-4E93-8AB7-FC30A1A2C861}
local.file.dc01 {D497F992-0F77-44D4-870B-7475342BEBDD}
local.file.file06 {60B495D0-8A47-460C-A77C-BCC882353C5F}
local.file.file03 {DE11FB99-5E04-4C74-91EE-FCE26D9D27C9}

So now I can continue testing Specops Deploy / OS. Also I wrote a function that does this, see my blog about Powershell function for getting the netboot GUID.