{"id":5744,"date":"2017-11-07T09:43:31","date_gmt":"2017-11-07T14:43:31","guid":{"rendered":"https:\/\/jdhitsolutions.com\/blog\/?p=5744"},"modified":"2017-11-07T09:43:31","modified_gmt":"2017-11-07T14:43:31","slug":"extending-hyper-v-with-powershell","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5744\/extending-hyper-v-with-powershell\/","title":{"rendered":"Extending Hyper-V with PowerShell"},"content":{"rendered":"<blockquote><p>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 <a title=\"read online help for this cmdlet\" href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/module\/hyper-v\/get-vm?view=win10-ps\" target=\"_blank\" rel=\"noopener\">Get-VM<\/a> provides a lot of information, I always seem to want more so I thought I'd share with you my Hyper-V related type extensions. Even if you don't need or use Hyper-V, you might find my techniques useful.<\/p><\/blockquote>\n<p><!--more--><\/p>\n<blockquote><p>The object type for a Hyper-V virtual machine is Microsoft.HyperV.PowerShell.VirtualMachine which you can get easily enough by running Get-VM and piping it to <a title=\"Read online help for this command\" href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=113322\" target=\"_blank\" rel=\"noopener\">Get-Member<\/a>. Using <a title=\"Read online help for this command\" href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=113421\" target=\"_blank\" rel=\"noopener\">Update-TypeData<\/a>, there are a number of script properties I want to define. These are properties where the value is calculated by a PowerShell script block. For example, I want to be able to quickly see if a virtual machine is missing any of its configured disk files. I could run a command like this:<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image-4.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-4.png\" alt=\"image\" width=\"1028\" height=\"558\" border=\"0\" \/><\/a><\/p>\n<p>But if I want this information often, that's too much typing. So instead I can create a script property with this script block. This version takes into account that the VM might have multiple disks, one or more of which might be missing.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">{\r\n    if ($this.HardDrives) {\r\n        #test if there are any false results\r\n        if ( ($this | Get-VMHardDiskDrive | Test-Path) -contains $False ) {\r\n            $False\r\n        }\r\n        else {\r\n            $True\r\n        }\r\n    }\r\n    else {\r\n        #no hard drive files configured or found\r\n        $false\r\n    }\r\n}\r\n<\/pre>\n<p>On a related note, I'd like to know how much disk space the virtual machine is consuming.<\/p>\n<pre class=\"lang:ps mark:0 decode:true \">{ \r\n $stat = Get-VMHardDiskDrive -VMName $this.vmname | Get-Item | Measure-Object -Property length -sum\r\n [math]::Round($stat.sum\/1GB,2)\r\n}\r\n<\/pre>\n<p>I also like to know the path to the configuration file. This will be a vmcx file with a file name that matches the virtual machine's ID.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">Join-path -Path \"$($this.configurationLocation)\\Virtual Machines\" -ChildPath \"$($this.vmid).vmcx\" -Resolve\r\n<\/pre>\n<p>In order to define these, and a few others, I use code like this in my PowerShell profile script.<\/p>\n<p>I define a hashtable where the key will be the property name and the value is the scriptblock I will use.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">$extensions = @{\r\nTestVHD = {\r\n    if ($this.HardDrives) {\r\n        #test if there are any false results\r\n        if ( ($this | Get-VMHardDiskDrive | Test-Path) -contains $False ) {\r\n            $False\r\n        }\r\n        else {\r\n            $True\r\n        }\r\n    }\r\n    else {\r\n        #no hard drive files configured or found\r\n        $false\r\n    } \r\n}\r\nConfigurationFile = {\r\n Join-path -Path \"$($this.configurationLocation)\\Virtual Machines\" -ChildPath \"$($this.vmid).vmcx\" -Resolve\r\n } \r\nDiskpath = {$this.Harddrives.path}\r\nRunning = { if ($this.state -eq 'Running') {$True} else { $False}}\r\nSizeGB = { \r\n $stat = Get-VMHardDiskDrive -VMName $this.vmname | Get-Item | Measure-Object -Property length -sum\r\n [math]::Round($stat.sum\/1GB,2)\r\n  }\r\n}\r\n<\/pre>\n<p>Next I define a hashtable of parameters that I will splat with Update-TypeData.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">$params = @{\r\n  TypeName = 'Microsoft.HyperV.PowerShell.VirtualMachine' \r\n  MemberType = 'ScriptProperty'\r\n  MemberName = ''\r\n  Value = ''\r\n  Force = $True\r\n}\r\n<\/pre>\n<p>The last step is to enumerate the extensions and update type data.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">$extensions.GetEnumerator() | foreach {\r\n $params.memberName = $_.key\r\n $params.value = $_.value\r\n # Write-Host \"Creating script property $($_.key)\" -ForegroundColor cyan\r\n Update-Typedata @params\r\n}\r\n<\/pre>\n<p>By using hash tables, my code organized and easier to read.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image-5.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-5.png\" alt=\"image\" width=\"1028\" height=\"673\" border=\"0\" \/><\/a><\/p>\n<p>And now I can run commands like this:<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image-6.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-6.png\" alt=\"image\" width=\"1028\" height=\"570\" border=\"0\" \/><\/a><\/p>\n<p>I love that PowerShell provides the flexibility to meet <em>my<\/em> needs. As always, comments and feedback are welcome.<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Lately I&#8217;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 a lot of information, I&#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":"New blog posting: Extending Hyper-V with #PowerShell","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],"tags":[573,534,256],"class_list":["post-5744","post","type-post","status-publish","format-standard","hentry","category-hyper-v","category-powershell","tag-hyper-v","tag-powershell","tag-type-extensions"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Extending Hyper-V with PowerShell &#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\/5744\/extending-hyper-v-with-powershell\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Extending Hyper-V with PowerShell &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"Lately I&#039;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 a lot of information, I...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/5744\/extending-hyper-v-with-powershell\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2017-11-07T14:43:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-4.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\\\/5744\\\/extending-hyper-v-with-powershell\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5744\\\/extending-hyper-v-with-powershell\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Extending Hyper-V with PowerShell\",\"datePublished\":\"2017-11-07T14:43:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5744\\\/extending-hyper-v-with-powershell\\\/\"},\"wordCount\":367,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5744\\\/extending-hyper-v-with-powershell\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/image_thumb-4.png\",\"keywords\":[\"Hyper-V\",\"PowerShell\",\"type extensions\"],\"articleSection\":[\"Hyper-V\",\"PowerShell\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5744\\\/extending-hyper-v-with-powershell\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5744\\\/extending-hyper-v-with-powershell\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5744\\\/extending-hyper-v-with-powershell\\\/\",\"name\":\"Extending Hyper-V with PowerShell &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5744\\\/extending-hyper-v-with-powershell\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5744\\\/extending-hyper-v-with-powershell\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/image_thumb-4.png\",\"datePublished\":\"2017-11-07T14:43:31+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5744\\\/extending-hyper-v-with-powershell\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5744\\\/extending-hyper-v-with-powershell\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5744\\\/extending-hyper-v-with-powershell\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/image_thumb-4.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/image_thumb-4.png\",\"width\":1028,\"height\":558},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5744\\\/extending-hyper-v-with-powershell\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Hyper-V\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/hyper-v\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Extending Hyper-V with PowerShell\"}]},{\"@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":"Extending Hyper-V with PowerShell &#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\/5744\/extending-hyper-v-with-powershell\/","og_locale":"en_US","og_type":"article","og_title":"Extending Hyper-V with PowerShell &#8226; The Lonely Administrator","og_description":"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 a lot of information, I...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5744\/extending-hyper-v-with-powershell\/","og_site_name":"The Lonely Administrator","article_published_time":"2017-11-07T14:43:31+00:00","og_image":[{"url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-4.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\/5744\/extending-hyper-v-with-powershell\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5744\/extending-hyper-v-with-powershell\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Extending Hyper-V with PowerShell","datePublished":"2017-11-07T14:43:31+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5744\/extending-hyper-v-with-powershell\/"},"wordCount":367,"commentCount":0,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5744\/extending-hyper-v-with-powershell\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-4.png","keywords":["Hyper-V","PowerShell","type extensions"],"articleSection":["Hyper-V","PowerShell"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/5744\/extending-hyper-v-with-powershell\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5744\/extending-hyper-v-with-powershell\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5744\/extending-hyper-v-with-powershell\/","name":"Extending Hyper-V with PowerShell &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5744\/extending-hyper-v-with-powershell\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5744\/extending-hyper-v-with-powershell\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-4.png","datePublished":"2017-11-07T14:43:31+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5744\/extending-hyper-v-with-powershell\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/5744\/extending-hyper-v-with-powershell\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5744\/extending-hyper-v-with-powershell\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-4.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/11\/image_thumb-4.png","width":1028,"height":558},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5744\/extending-hyper-v-with-powershell\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Hyper-V","item":"https:\/\/jdhitsolutions.com\/blog\/category\/hyper-v\/"},{"@type":"ListItem","position":2,"name":"Extending Hyper-V with PowerShell"}]},{"@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":2566,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2566\/importing-hyper-v-vm-from-a-powershell-backup\/","url_meta":{"origin":5744,"position":0},"title":"Importing Hyper-V VM from a PowerShell Backup","author":"Jeffery Hicks","date":"November 5, 2012","format":false,"excerpt":"My Petri article this week is on importing Hyper-V VMs from a backup. http:\/\/bit.ly\/PRE0pk I have many more articles on Hyper-V on Windows 8 on the site as well. You can find all of my recent posts here.","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3371,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell-3-0\/3371\/hyper-v-waiting-to-merge\/","url_meta":{"origin":5744,"position":1},"title":"Hyper-V Waiting to Merge","author":"Jeffery Hicks","date":"August 28, 2013","format":false,"excerpt":"In my Hyper-V environment I have a test domain which I use for pretty much all of my training, writing and video work. As part of my \"belt and suspenders\" approach, I periodically take a snapshot of all the virtual machines using the theory that if I had to, I\u2026","rel":"","context":"In &quot;Hyper-V&quot;","block_context":{"text":"Hyper-V","link":"https:\/\/jdhitsolutions.com\/blog\/category\/hyper-v\/"},"img":{"alt_text":"Microsoft Hyper-V","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/hyperv.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":4547,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4547\/hyper-v-memory-utilization-with-powershell\/","url_meta":{"origin":5744,"position":2},"title":"Hyper-V Memory Utilization with PowerShell","author":"Jeffery Hicks","date":"October 6, 2015","format":false,"excerpt":"I really push the limits of my Hyper-V setup. I know I am constrained by memory and am hoping to expand my network before the end of the year. But in the meantime I have to keep close tabs on memory. I thought I'd share a few commands with you.\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":5744,"position":3},"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":5744,"position":4},"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":2491,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2491\/hyper-v-vhd-summary\/","url_meta":{"origin":5744,"position":5},"title":"Hyper-V VHD Summary","author":"Jeffery Hicks","date":"September 14, 2012","format":false,"excerpt":"When I made the move to Windows 8, one of my tasks was to migrate my test environment from VirtualBox to Hyper-V. Windows 8 includes a client Hyper-V feature that is easy to use and includes PowerShell support. Plus I needed to expand my Hyper-V skills anyway, especially from the\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\/2012\/04\/computereye-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5744","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=5744"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5744\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=5744"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=5744"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=5744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}