{"id":3740,"date":"2014-03-13T08:17:19","date_gmt":"2014-03-13T12:17:19","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=3740"},"modified":"2014-03-13T08:17:19","modified_gmt":"2014-03-13T12:17:19","slug":"infoworld-automate-live-vm-export","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3740\/infoworld-automate-live-vm-export\/","title":{"rendered":"InfoWorld: Automate Live VM Export"},"content":{"rendered":"<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/03\/infoworld.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-3742\" alt=\"infoworld\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/03\/infoworld.png\" width=\"325\" height=\"96\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/03\/infoworld.png 325w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/03\/infoworld-300x88.png 300w\" sizes=\"auto, (max-width: 325px) 100vw, 325px\" \/><\/a>This is kinda cool, but I got published in InfoWorld, in a roundabout manner. J. Peter Bruzzese writes a column for InfoWorld on enterprise Windows. His latest <a title=\"read the original article\" href=\"http:\/\/bit.ly\/1cxxAXp\" target=\"_blank\">column<\/a> is about exporting Hyper-V virtual machines using PowerShell. In Windows Server 2012 R2 (and Windows 8.1) you can export a virtual machine even while it is running. Peter wanted to demonstrate with a weekly and monthly scenario using PowerShell to export virtual machines to a new folder and also delete older versions. The end result would be a set of 4 weekly folders and 2 monthly folders. But he needed help with some of the PowerShell so I pulled together a script which is linked in the InfoWorld article.<\/p>\n<p>The script I wrote is a bit more complicated than what Peter originally envisioned. Now, I doubt his goal could be accomplished with a one-liner. So since I needed to write a script, I took the time to make it robust with items such as error handling and parameter validation. I only wanted to develop the script once so why not be thorough?<\/p>\n<p>As I as finishing up the script to Peter's requirements, I realized this could also be tackled using a PowerShell workflow. One of the limitations in the original script is that it needs to run on the Hyper-V server. I didn't include any provision for connecting to a remote server. I also recognized that exporting multiple virtual machines could be done in parallel. Although my original script allows the use of background jobs which is sort of like running in parallel. But I thought a workflow version might at least be educational. Here is the Export-MyVM workflow.<\/p>\n<pre class=\"lang:ps decode:true\">#requires -version 3.0\r\n#requires -module Hyper-V\r\n\r\nWorkflow Export-MyVM {\r\n\r\nParam(\r\n[Parameter(Position=0,Mandatory=$True,\r\nHelpMessage=\"Enter the virtual machine name or names\")]\r\n[ValidateNotNullorEmpty()]\r\n[Alias(\"name\")]\r\n[string[]]$VM,\r\n[Parameter(Position=0,Mandatory=$True,\r\nHelpMessage=\"Enter the root backup path\")]\r\n[ValidateNotNullorEmpty()]\r\n[string]$Path,\r\n[switch]$Monthly\r\n)\r\n\r\nWrite-Verbose -Message \"Starting $workflowcommandname\"\r\n#define some variables if we are doing weekly or monthly backups\r\nif ($monthly) {\r\n  $type = \"Monthly\"\r\n  $retain = 2\r\n}\r\nelse {\r\n   $type = \"Weekly\"\r\n   $retain = 4\r\n}\r\n\r\nWrite-Verbose -message \"Processing $type backups. Retaining last $retain.\"\r\n\r\n#manage folders\r\n\r\n#get backup directory list\r\nTry {\r\n Write-Verbose -Message \"Checking $path for subfolders\"\r\n\r\n #get only directories under the path that start with Weekly or Monthly\r\n $subFolders =  Get-ChildItem -Path $path\\$type* -Directory -ErrorAction Stop\r\n}\r\nCatch {\r\n    Write-Warning \"Failed to enumerate folders from $path. $($_.Exception.Message)\"\r\n    #bail out of the script\r\n    return\r\n}\r\n\r\n#check if any backup folders\r\nif ($subFolders) {\r\n    #if found, get count\r\n    Write-Verbose -message \"Found $($subfolders.count) folder(s)\"\r\n\r\n    #if more than the value of $retain, delete oldest one\r\n    if ($subFolders.count -ge $retain ) {\r\n       #get oldest folder based on its CreationTime property\r\n       $oldest = $subFolders | Sort-Object -property CreationTime | Select-Object -first 1 \r\n       Write-Verbose -message \"Deleting oldest folder $($oldest.fullname)\"\r\n       #delete it\r\n       $oldest | Remove-Item -Recurse -Force \r\n    }\r\n\r\n } #if $subfolders\r\nelse {\r\n    #if none found, create first one\r\n    Write-Verbose -Message \"No matching folders found. Creating the first folder\"    \r\n}\r\n\r\n#create the folder\r\n#get the current date\r\n$now = Get-Date\r\n\r\n#name format is Type_Year_Month_Day_HourMinute\r\n$childPath = \"{0}_{1}_{2:D2}_{3:D2}_{4:D2}{5:D2}\" -f $type,$now.year,$now.month,$now.day,$now.hour,$now.minute\r\n\r\n#create a variable that represents the new folder path\r\n$newpath = Join-Path -Path $path -ChildPath $childPath\r\n\r\nTry {\r\n    Write-Verbose -message \"Creating $newpath\"\r\n    #Create the new backup folder\r\n    $BackupFolder = New-Item -Path $newpath -ItemType directory -ErrorAction Stop \r\n}\r\nCatch {\r\n  Write-Warning -message \"Failed to create folder $newpath.\"\r\n  throw $_\r\n  #failed to create folder so bail out of the script\r\n  Return\r\n}\r\n\r\n#export VMs\r\nif ($BackupFolder) {\r\n\r\n#export each machine in parallel\r\nforeach -parallel ($item in $VM) {\r\n    Write-Verbose -Message \"Exporting $item\"\r\n\r\n    #define a hashtable of parameters to splat to Export-VM\r\n    $exportParam = @{\r\n     Path = $newPath\r\n     Name=$item\r\n     ErrorAction=\"Stop\"\r\n    }\r\n    Try {\r\n          Export-VM @exportParam\r\n    }\r\n    Catch {\r\n           Write-Warning \"Failed to export virtual machine(s).\"\r\n           Throw $_\r\n     }\r\n\r\n    } #foreach parallel\r\n} #if backup folder exists \r\n\r\nWrite-Verbose -Message \"Ending $workflowcommandname\"\r\n\r\n} #close workflow<\/pre>\n<p>Most of the code is the same as the original script, although I removed the WhatIf parameter. You can't use SupportsShouldProcess in a workflow and I didn't have the time to fully write my own. The only code that is really workflow specific is this:<\/p>\n<pre class=\"lang:ps decode:true\">#export each machine in parallel\r\nforeach -parallel ($item in $VM) {\r\n    Write-Verbose -Message \"Exporting $item\"\r\n\r\n    #define a hashtable of parameters to splat to Export-VM\r\n    $exportParam = @{\r\n     Path = $newPath\r\n     Name=$item\r\n     ErrorAction=\"Stop\"\r\n    }\r\n    Try {\r\n          Export-VM @exportParam\r\n    }\r\n    Catch {\r\n           Write-Warning \"Failed to export virtual machine(s).\"\r\n           Throw $_\r\n     }\r\n\r\n    } #foreach parallel<\/pre>\n<p>Perhaps the biggest advantage is that with a workflow I get automatic support for background jobs and remoting. Now I can execute the workflow against the Hyper-V server.<\/p>\n<pre class=\"lang:batch decode:true\">PS C:\\&gt; export-myvm -name 'chi-client02','chi-dctest' -path d:\\backup -Verbose -AsJob -PSComputerName chi-hvr2.globomantics.local\r\n\r\nId     Name            PSJobTypeName   State         HasMoreData     Location             Command                  \r\n--     ----            -------------   -----         -----------     --------             -------                  \r\n100    Job100          PSWorkflowJob   Running       True            chi-hvr2.globoman... export-myvm              \r\n\r\nPS C:\\&gt; get-job 100 -IncludeChildJob\r\n\r\nId     Name            PSJobTypeName   State         HasMoreData     Location             Command                  \r\n--     ----            -------------   -----         -----------     --------             -------                  \r\n100    Job100          PSWorkflowJob   Running       True            chi-hvr2.globoman... export-myvm              \r\n101    Job101          PSWorkflowJob   Running       True            chi-hvr2.globoman... Export-MyVM<\/pre>\n<p>And I could still create a PowerShell scheduled job on my computer to run this workflow.<\/p>\n<p>By the way, I'm sure you are aware that there are plenty of Hyper-V backup products from companies like Altaro, Veeam and Unitrends (all of whom help support my blog). Some of them even have free versions of their products. So while you can use PowerShell to export VMs that doesn't mean you should. Although I can see value for a quick and dirty backup. Ultimately, I suppose it is a good thing to have options.<\/p>\n<p>Enjoy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is kinda cool, but I got published in InfoWorld, in a roundabout manner. J. Peter Bruzzese writes a column for InfoWorld on enterprise Windows. His latest column is about exporting Hyper-V virtual machines using PowerShell. In Windows Server 2012 R2 (and Windows 8.1) you can export a virtual machine even while it is running&#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":"Fresh Blog -> InfoWorld: Automate Live VM Export with PowerShell http:\/\/wp.me\/p1nF6U-Yk","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,114],"tags":[201,573,458,534,540],"class_list":["post-3740","post","type-post","status-publish","format-standard","hentry","category-hyper-v","category-powershell","category-professional","tag-backup","tag-hyper-v","tag-infoworld","tag-powershell","tag-scripting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>InfoWorld: Automate Live VM Export &#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\/3740\/infoworld-automate-live-vm-export\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"InfoWorld: Automate Live VM Export &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"This is kinda cool, but I got published in InfoWorld, in a roundabout manner. J. Peter Bruzzese writes a column for InfoWorld on enterprise Windows. His latest column is about exporting Hyper-V virtual machines using PowerShell. In Windows Server 2012 R2 (and Windows 8.1) you can export a virtual machine even while it is running....\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/3740\/infoworld-automate-live-vm-export\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2014-03-13T12:17:19+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/03\/infoworld.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=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3740\\\/infoworld-automate-live-vm-export\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3740\\\/infoworld-automate-live-vm-export\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"InfoWorld: Automate Live VM Export\",\"datePublished\":\"2014-03-13T12:17:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3740\\\/infoworld-automate-live-vm-export\\\/\"},\"wordCount\":450,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3740\\\/infoworld-automate-live-vm-export\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/03\\\/infoworld.png\",\"keywords\":[\"Backup\",\"Hyper-V\",\"InfoWorld\",\"PowerShell\",\"Scripting\"],\"articleSection\":[\"Hyper-V\",\"PowerShell\",\"Professional\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3740\\\/infoworld-automate-live-vm-export\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3740\\\/infoworld-automate-live-vm-export\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3740\\\/infoworld-automate-live-vm-export\\\/\",\"name\":\"InfoWorld: Automate Live VM Export &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3740\\\/infoworld-automate-live-vm-export\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3740\\\/infoworld-automate-live-vm-export\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/03\\\/infoworld.png\",\"datePublished\":\"2014-03-13T12:17:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3740\\\/infoworld-automate-live-vm-export\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3740\\\/infoworld-automate-live-vm-export\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3740\\\/infoworld-automate-live-vm-export\\\/#primaryimage\",\"url\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/03\\\/infoworld.png\",\"contentUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/03\\\/infoworld.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3740\\\/infoworld-automate-live-vm-export\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Hyper-V\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/hyper-v\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"InfoWorld: Automate Live VM Export\"}]},{\"@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":"InfoWorld: Automate Live VM Export &#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\/3740\/infoworld-automate-live-vm-export\/","og_locale":"en_US","og_type":"article","og_title":"InfoWorld: Automate Live VM Export &#8226; The Lonely Administrator","og_description":"This is kinda cool, but I got published in InfoWorld, in a roundabout manner. J. Peter Bruzzese writes a column for InfoWorld on enterprise Windows. His latest column is about exporting Hyper-V virtual machines using PowerShell. In Windows Server 2012 R2 (and Windows 8.1) you can export a virtual machine even while it is running....","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3740\/infoworld-automate-live-vm-export\/","og_site_name":"The Lonely Administrator","article_published_time":"2014-03-13T12:17:19+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/03\/infoworld.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":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3740\/infoworld-automate-live-vm-export\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3740\/infoworld-automate-live-vm-export\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"InfoWorld: Automate Live VM Export","datePublished":"2014-03-13T12:17:19+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3740\/infoworld-automate-live-vm-export\/"},"wordCount":450,"commentCount":5,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3740\/infoworld-automate-live-vm-export\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/03\/infoworld.png","keywords":["Backup","Hyper-V","InfoWorld","PowerShell","Scripting"],"articleSection":["Hyper-V","PowerShell","Professional"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/3740\/infoworld-automate-live-vm-export\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3740\/infoworld-automate-live-vm-export\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3740\/infoworld-automate-live-vm-export\/","name":"InfoWorld: Automate Live VM Export &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3740\/infoworld-automate-live-vm-export\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3740\/infoworld-automate-live-vm-export\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/03\/infoworld.png","datePublished":"2014-03-13T12:17:19+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3740\/infoworld-automate-live-vm-export\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/3740\/infoworld-automate-live-vm-export\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3740\/infoworld-automate-live-vm-export\/#primaryimage","url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/03\/infoworld.png","contentUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/03\/infoworld.png"},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3740\/infoworld-automate-live-vm-export\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Hyper-V","item":"https:\/\/jdhitsolutions.com\/blog\/category\/hyper-v\/"},{"@type":"ListItem","position":2,"name":"InfoWorld: Automate Live VM Export"}]},{"@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":7047,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7047\/my-powershell-hyper-v-health-report\/","url_meta":{"origin":3740,"position":0},"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":2900,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2900\/test-hyper-v-vhd-folders-with-powershell\/","url_meta":{"origin":3740,"position":1},"title":"Test Hyper-V VHD Folders with PowerShell","author":"Jeffery Hicks","date":"April 1, 2013","format":false,"excerpt":"I've recently added a USB 3.0 Express Card adapter to my laptop to provide USB 3.0 functionality. The added performance is very useful in my Hyper-V setup. However, I am running into a glitch that I have yet to figure out where the external drives (the Express card has 2\u2026","rel":"","context":"In &quot;Hyper-V&quot;","block_context":{"text":"Hyper-V","link":"https:\/\/jdhitsolutions.com\/blog\/category\/hyper-v\/"},"img":{"alt_text":"test-vhdpath","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/04\/test-vhdpath-1024x314.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/04\/test-vhdpath-1024x314.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/04\/test-vhdpath-1024x314.png?resize=525%2C300 1.5x"},"classes":[]},{"id":5744,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5744\/extending-hyper-v-with-powershell\/","url_meta":{"origin":3740,"position":2},"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":2546,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/2546\/powershell-hyper-v-memory-report\/","url_meta":{"origin":3740,"position":3},"title":"PowerShell Hyper-V Memory Report","author":"Jeffery Hicks","date":"November 1, 2012","format":false,"excerpt":"Since moving to Windows 8, I've continued exploring all the possibilities around Hyper-V on the client, especially using PowerShell. Because I'm trying to run as many virtual machines on my laptop as I can, memory considerations are paramount as I only have 8GB to work with. Actually less since 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":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2012\/11\/happyreport-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2988,"url":"https:\/\/jdhitsolutions.com\/blog\/active-directory\/2988\/techdays-sf-presentations\/","url_meta":{"origin":3740,"position":4},"title":"TechDays SF Presentations","author":"Jeffery Hicks","date":"May 6, 2013","format":false,"excerpt":"Last week I presented a number of sessions at TechDays in beautiful San Francisco. Met some great people and had a great time. I presented 4 talks, almost all of them PowerShell-related. Actually, they all had some type of PowerShell content. I'm happy to share my session slides and PowerShell\u2026","rel":"","context":"In &quot;Active Directory&quot;","block_context":{"text":"Active Directory","link":"https:\/\/jdhitsolutions.com\/blog\/category\/active-directory\/"},"img":{"alt_text":"TechDays_logo250","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/05\/TechDays_logo250.gif?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":4685,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4685\/adding-some-power-to-hyper-v-vm-notes\/","url_meta":{"origin":3740,"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\/3740","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=3740"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/3740\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=3740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=3740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=3740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}