{"id":2657,"date":"2013-01-03T12:11:16","date_gmt":"2013-01-03T17:11:16","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=2657"},"modified":"2013-01-03T12:11:16","modified_gmt":"2013-01-03T17:11:16","slug":"hyper-v-id-hash-table","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2657\/hyper-v-id-hash-table\/","title":{"rendered":"Hyper-V ID Hash Table"},"content":{"rendered":"<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/hyperv.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/hyperv.png\" alt=\"Microsoft Hyper-V\" width=\"123\" height=\"125\" class=\"alignleft size-full wp-image-2661\" \/><\/a>In Hyper-V, one of the challenges (at least that I've run into) has to do with naming. In addition to a name, Hyper-V objects such as virtual machines, are identified with a GUID. Most of the VM-related PowerShell cmdlets will let you specify a virtual machine name. But sometimes you'll run across the GUID and wonder what is the corresponding virtual machine. Here's a WMI query using Get-CIMInstance that shows the currently open terminal connections to a few virtual machines.<\/p>\n<p><code><br \/>\nPS C:\\> get-ciminstance -Namespace root\\virtualization -class msvm_terminalconnection | Select connectionID,installdate<\/p>\n<p>connectionID                                      installdate<br \/>\n------------                                      -----------<br \/>\nMicrosoft:13876524-BFD8-40A1-95E3-926E37ACFBAB\\1  1\/3\/2013 11:27:50 AM<br \/>\nMicrosoft:80E967E6-57F9-4ECF-998A-D07B20B2287F\\2  1\/3\/2013 8:12:56 AM<br \/>\nMicrosoft:E1EDE8DA-D632-4F77-81C4-B117FFF1FE15\\1  1\/3\/2013 8:08:35 AM<\/p>\n<p><\/code><\/p>\n<p>The GUID in the connection ID corresponds to a virtual machine. Here's my approach for \"translating\" the GUID to a name.  Every VM has an ID.<\/p>\n<p><code><br \/>\nPS C:\\> (get-vm chi-dc01).id<\/p>\n<p>Guid<br \/>\n----<br \/>\nf7d3ad8b-6329-43a3-991e-8a630a94ec40<br \/>\n<\/code><\/p>\n<p>There is also an VMID property but that is merely an alias to ID. As you can see, the ID is a GUID object so to get just the GUID string takes another step.<\/p>\n<p><code><br \/>\nPS C:\\> (get-vm chi-dc01).id.guid<br \/>\nf7d3ad8b-6329-43a3-991e-8a630a94ec40<br \/>\n<\/code><\/p>\n<p>Now that I know how to capture this information, I can build a \"lookup\" object using a hash table.<\/p>\n<p><code><br \/>\nPS C:\\> Get-VM | Group-Object  -property {$_.ID.GUID} -AsHashTable -AsString<br \/>\n<\/code><\/p>\n<p>Here's what I end up with:<\/p>\n<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/vmidhash.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/vmidhash-300x134.png\" alt=\"vmidhash\" width=\"300\" height=\"134\" class=\"aligncenter size-medium wp-image-2658\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/vmidhash-300x134.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/vmidhash-1024x460.png 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/vmidhash-624x280.png 624w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/vmidhash.png 1137w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Naturally, it makes more sense to save this to a variable.<\/p>\n<p><code><br \/>\nPS C:\\> $vmhash = Get-VM | Group-Object  -property {$_.ID.GUID} -AsHashTable -AsString<br \/>\n<\/code><\/p>\n<p>The VM GUID is the key and the VM object is the value. I can get items a few ways.<\/p>\n<p><code><br \/>\nPS C:\\> $vmhash.'13876524-bfd8-40a1-95e3-926e37acfbab'<\/p>\n<p>Name     State   CPUUsage(%) MemoryAssigned(M) Uptime   Status<br \/>\n----     -----   ----------- ----------------- ------   ------<br \/>\nCHI-FP01 Running 0           761               03:34:51 Operating normally<\/p>\n<p>PS C:\\> $vmhash.item('13876524-bfd8-40a1-95e3-926e37acfbab')<\/p>\n<p>Name     State   CPUUsage(%) MemoryAssigned(M) Uptime   Status<br \/>\n----     -----   ----------- ----------------- ------   ------<br \/>\nCHI-FP01 Running 0           761               03:35:11 Operating normally<\/p>\n<p>PS C:\\> $vmhash.GetEnumerator() | where {$_.name -match '13876524-bfd8-40a1-95e3-926e37acfbab'} | se<br \/>\nlect -ExpandProperty Value<\/p>\n<p>Name     State   CPUUsage(%) MemoryAssigned(M) Uptime   Status<br \/>\n----     -----   ----------- ----------------- ------   ------<br \/>\nCHI-FP01 Running 0           761               03:36:29 Operating normally<br \/>\n<\/code><\/p>\n<p>Now I can add some logic to my Get-CIMInstance command to resolve the GUID to the VM name.<\/p>\n<p><code lang=\"PowerShell\"><br \/>\n$vmhash = Get-VM | Group-Object  -property {$_.ID.GUID} -AsHashTable -AsString<\/p>\n<p>Get-CimInstance -Namespace root\\virtualization -class msvm_terminalconnection |<br \/>\nSelect @{Name=\"Started\";Expression={$_.installdate}},<br \/>\n@{Name=\"RunTime\";Expression={(Get-Date)-$_.InstallDate}},<br \/>\n@{Name=\"VM\";Expression={<br \/>\n  #define a GUID regex<br \/>\n [regex]$rx=\"(\\{){0,1}[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}(\\}){0,1}\"<\/p>\n<p> $guid = $rx.Match($_.ConnectionID).Value<br \/>\n $vmhash.item($guid).Name<br \/>\n}}<br \/>\n<\/code><\/p>\n<p>I also tweaked a few other properties. I extracted the GUID using a regular expression and then found the corresponding entry in the hash table. I could have added a little extra logic to test if the GUID existed as a key but I decided to just plow ahead. <\/p>\n<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/vmidhashlookup.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/vmidhashlookup-300x149.png\" alt=\"vmidhashlookup\" width=\"300\" height=\"149\" class=\"aligncenter size-medium wp-image-2660\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/vmidhashlookup-300x149.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/vmidhashlookup-1024x508.png 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/vmidhashlookup-624x310.png 624w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/vmidhashlookup.png 1137w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The hash table makes it very easy now to resolve virtual machine GUID's to a user friendly name.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Hyper-V, one of the challenges (at least that I&#8217;ve run into) has to do with naming. In addition to a name, Hyper-V objects such as virtual machines, are identified with a GUID. Most of the VM-related PowerShell cmdlets will let you specify a virtual machine name. But sometimes you&#8217;ll run across the GUID and&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[401,4,407],"tags":[199,573,534],"class_list":["post-2657","post","type-post","status-publish","format-standard","hentry","category-hyper-v","category-powershell","category-windows-server-2012","tag-hashtable","tag-hyper-v","tag-powershell"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Hyper-V ID Hash Table &#8226; The Lonely Administrator<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/2657\/hyper-v-id-hash-table\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hyper-V ID Hash Table &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"In Hyper-V, one of the challenges (at least that I&#039;ve run into) has to do with naming. In addition to a name, Hyper-V objects such as virtual machines, are identified with a GUID. Most of the VM-related PowerShell cmdlets will let you specify a virtual machine name. But sometimes you&#039;ll run across the GUID and...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/2657\/hyper-v-id-hash-table\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2013-01-03T17:11:16+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/hyperv.png\" \/>\n<meta name=\"author\" content=\"Jeffery Hicks\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:site\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeffery Hicks\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2657\\\/hyper-v-id-hash-table\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2657\\\/hyper-v-id-hash-table\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Hyper-V ID Hash Table\",\"datePublished\":\"2013-01-03T17:11:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2657\\\/hyper-v-id-hash-table\\\/\"},\"wordCount\":291,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2657\\\/hyper-v-id-hash-table\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/01\\\/hyperv.png\",\"keywords\":[\"hashtable\",\"Hyper-V\",\"PowerShell\"],\"articleSection\":[\"Hyper-V\",\"PowerShell\",\"Windows Server 2012\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2657\\\/hyper-v-id-hash-table\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2657\\\/hyper-v-id-hash-table\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2657\\\/hyper-v-id-hash-table\\\/\",\"name\":\"Hyper-V ID Hash Table &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2657\\\/hyper-v-id-hash-table\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2657\\\/hyper-v-id-hash-table\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/01\\\/hyperv.png\",\"datePublished\":\"2013-01-03T17:11:16+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2657\\\/hyper-v-id-hash-table\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2657\\\/hyper-v-id-hash-table\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2657\\\/hyper-v-id-hash-table\\\/#primaryimage\",\"url\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/01\\\/hyperv.png\",\"contentUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/01\\\/hyperv.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2657\\\/hyper-v-id-hash-table\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Hyper-V\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/hyper-v\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hyper-V ID Hash Table\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/\",\"name\":\"The Lonely Administrator\",\"description\":\"Practical Advice for the Automating IT Pro\",\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\",\"name\":\"Jeffery Hicks\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"caption\":\"Jeffery Hicks\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Hyper-V ID Hash Table &#8226; The Lonely Administrator","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2657\/hyper-v-id-hash-table\/","og_locale":"en_US","og_type":"article","og_title":"Hyper-V ID Hash Table &#8226; The Lonely Administrator","og_description":"In Hyper-V, one of the challenges (at least that I've run into) has to do with naming. In addition to a name, Hyper-V objects such as virtual machines, are identified with a GUID. Most of the VM-related PowerShell cmdlets will let you specify a virtual machine name. But sometimes you'll run across the GUID and...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2657\/hyper-v-id-hash-table\/","og_site_name":"The Lonely Administrator","article_published_time":"2013-01-03T17:11:16+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/hyperv.png","type":"","width":"","height":""}],"author":"Jeffery Hicks","twitter_card":"summary_large_image","twitter_creator":"@JeffHicks","twitter_site":"@JeffHicks","twitter_misc":{"Written by":"Jeffery Hicks","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2657\/hyper-v-id-hash-table\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2657\/hyper-v-id-hash-table\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Hyper-V ID Hash Table","datePublished":"2013-01-03T17:11:16+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2657\/hyper-v-id-hash-table\/"},"wordCount":291,"commentCount":2,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2657\/hyper-v-id-hash-table\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/hyperv.png","keywords":["hashtable","Hyper-V","PowerShell"],"articleSection":["Hyper-V","PowerShell","Windows Server 2012"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/2657\/hyper-v-id-hash-table\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2657\/hyper-v-id-hash-table\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2657\/hyper-v-id-hash-table\/","name":"Hyper-V ID Hash Table &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2657\/hyper-v-id-hash-table\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2657\/hyper-v-id-hash-table\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/hyperv.png","datePublished":"2013-01-03T17:11:16+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2657\/hyper-v-id-hash-table\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/2657\/hyper-v-id-hash-table\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2657\/hyper-v-id-hash-table\/#primaryimage","url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/hyperv.png","contentUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/hyperv.png"},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2657\/hyper-v-id-hash-table\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Hyper-V","item":"https:\/\/jdhitsolutions.com\/blog\/category\/hyper-v\/"},{"@type":"ListItem","position":2,"name":"Hyper-V ID Hash Table"}]},{"@type":"WebSite","@id":"https:\/\/jdhitsolutions.com\/blog\/#website","url":"https:\/\/jdhitsolutions.com\/blog\/","name":"The Lonely Administrator","description":"Practical Advice for the Automating IT Pro","publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jdhitsolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9","name":"Jeffery Hicks","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","caption":"Jeffery Hicks"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":4572,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4572\/what-are-you\/","url_meta":{"origin":2657,"position":0},"title":"What Are You?","author":"Jeffery Hicks","date":"October 23, 2015","format":false,"excerpt":"Here's a quick way to tell whether a given machine is real or not: check the Win32_Baseboard class. You can use either Get-WmiObject or Get-CimInstance. Notice the results from a few physical machines. Now see the result when querying a Hyper-V virtual machine: I don't have any VMware available so\u2026","rel":"","context":"In &quot;Hyper-V&quot;","block_context":{"text":"Hyper-V","link":"https:\/\/jdhitsolutions.com\/blog\/category\/hyper-v\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7047,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7047\/my-powershell-hyper-v-health-report\/","url_meta":{"origin":2657,"position":1},"title":"My PowerShell Hyper-V Health Report","author":"Jeffery Hicks","date":"December 5, 2019","format":false,"excerpt":"Over the last few years I've been using and tweaking a PowerShell script that generates an HTML report that provides information about a Hyper-V host and running virtual machines. This is another great use case for a PowerShell control script. The script helps me organize commands like Get-CimInstance, Get-VM and\u2026","rel":"","context":"In &quot;Hyper-V&quot;","block_context":{"text":"Hyper-V","link":"https:\/\/jdhitsolutions.com\/blog\/category\/hyper-v\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-8.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-8.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-8.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/12\/image_thumb-8.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":4432,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4432\/vmdk-to-vhdx-pdq\/","url_meta":{"origin":2657,"position":2},"title":"VMDK to VHDX PDQ","author":"Jeffery Hicks","date":"June 26, 2015","format":false,"excerpt":"I have a very old VMware ESXi server that has outlived its useful life. The hardware is at least 5 years old and my VMware license has expired. I can still bring up the server and see the virtual machines, but that's about it. I still keep the box so\u2026","rel":"","context":"In &quot;Hyper-V&quot;","block_context":{"text":"Hyper-V","link":"https:\/\/jdhitsolutions.com\/blog\/category\/hyper-v\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5744,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5744\/extending-hyper-v-with-powershell\/","url_meta":{"origin":2657,"position":3},"title":"Extending Hyper-V with PowerShell","author":"Jeffery Hicks","date":"November 7, 2017","format":false,"excerpt":"Lately I've been writing about my use of PowerShell type extensions as a way to get more done quickly. Or at least give me the information I want with minimal effort. I use Hyper-V a great deal and the Hyper-V cmdlets are invaluable. And while a command like Get-VM provides\u2026","rel":"","context":"In &quot;Hyper-V&quot;","block_context":{"text":"Hyper-V","link":"https:\/\/jdhitsolutions.com\/blog\/category\/hyper-v\/"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-4.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-4.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-4.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-4.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":4457,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4457\/creating-a-hyper-v-vm-memory-report\/","url_meta":{"origin":2657,"position":4},"title":"Creating a Hyper-V VM Memory Report","author":"Jeffery Hicks","date":"July 20, 2015","format":false,"excerpt":"I use Hyper-V to run my lab environment. Since I work at home I don't have access to a \"real\" production network so I have to make do with a virtualized environment. Given budgetary constraints I also don't have a lot of high end hardware with endless amount of RAM\u2026","rel":"","context":"In &quot;Hyper-V&quot;","block_context":{"text":"Hyper-V","link":"https:\/\/jdhitsolutions.com\/blog\/category\/hyper-v\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4685,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4685\/adding-some-power-to-hyper-v-vm-notes\/","url_meta":{"origin":2657,"position":5},"title":"Adding Some Power to Hyper-V VM Notes","author":"Jeffery Hicks","date":"December 15, 2015","format":false,"excerpt":"I use they Hyper-V virtual machine note to store system information. Here's how I get it and set with PowerShell.","rel":"","context":"In &quot;Hyper-V&quot;","block_context":{"text":"Hyper-V","link":"https:\/\/jdhitsolutions.com\/blog\/category\/hyper-v\/"},"img":{"alt_text":"System Information","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/12\/image_thumb-1.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/12\/image_thumb-1.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/12\/image_thumb-1.png?resize=525%2C300 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2657","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=2657"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2657\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=2657"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=2657"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=2657"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}