Earlier I needed to find the netboot GUID of machines in Hyper-V. So I wrote a small powershell snipit for that.. And since I continued to need that and I didn’t to continue running all those lines each time I did a small function. So this time I went through the code and wrote a small function that does what I need. I have published it on Script Center Galleries.

Some examples:

PS C:\> Get-VirotVMBootGUID -VMName local.file.client01|FT -AutoSize

Name                netbootGUID
----                -----------
local.file.client01 {2221ED02-A528-4F96-89DE-A928B6196440}

and

PS C:\> Get-VirotVMBootGUID |Format-Table -AutoSize

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}
local.file.client01    {2221ED02-A528-4F96-89DE-A928B6196440}

You can download it from theĀ Script Center Galleries here.