{"id":239,"date":"2010-05-25T21:25:36","date_gmt":"2010-05-25T21:25:36","guid":{"rendered":"http:\/\/read.virtualizeplanet.com\/?p=239"},"modified":"2011-12-02T21:35:21","modified_gmt":"2011-12-02T21:35:21","slug":"powercli-lesson-6","status":"publish","type":"post","link":"http:\/\/read.virtualizeplanet.com\/?p=239","title":{"rendered":"PowerCLI: Lesson #6"},"content":{"rendered":"<p>This lesson I thought I&#8217;d talk about some realworld stuff.\u00a0 In my lab I had a need to use VMware DPM to reduce the heat my home servers where creating by shutting down 1 server while not needed. What I wanted though was to control at what point&#8217;s through the day DPM was enabled or disabled, and when disabled both my lab systems should be powered up.<\/p>\n<p>Asked for help on this one from Luc Dekens \u2013 <a href=\"http:\/\/www.lucd.info\/\">http:\/\/www.lucd.info<\/a> as control of DPM wasn&#8217;t so obvious and Luc pointed me to this:<\/p>\n<p><a href=\"http:\/\/virtualizeplanet.com\/wordpress\/wp-content\/uploads\/2010\/05\/initscript.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-241\" title=\"initscript\" src=\"http:\/\/virtualizeplanet.com\/wordpress\/wp-content\/uploads\/2010\/05\/initscript.jpg\" alt=\"\" width=\"601\" height=\"90\" srcset=\"http:\/\/read.virtualizeplanet.com\/wp-content\/uploads\/2010\/05\/initscript.jpg 601w, http:\/\/read.virtualizeplanet.com\/wp-content\/uploads\/2010\/05\/initscript-300x44.jpg 300w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/a><\/p>\n<p>I looked at it and thought uh! But then a few memories started to trigger in my brain. Having previously programmed the SDK in C# I recognized that this was calling the SDK direct some way. \u00a0So let&#8217;s break it down line by line an try and find out what&#8217;s going on:<\/p>\n<p><strong><em>$cluster = Get-Cluster &lt;clustername&gt; | Get-View<\/em><\/strong><\/p>\n<p>DPM is configured in the settings of a cluster. The line above declares a variable <strong><em>$cluster<\/em><\/strong> and then we pass in the results of the <strong><em>Get-Cluster<\/em><\/strong> cmdlet which in turn was piped through the <strong><em>Get-View<\/em><\/strong> cmdlet.<\/p>\n<p>The <strong><em>Get-Cluster<\/em><\/strong> part will return the status of the specified cluster but it&#8217;s not enough and this is where piping it into <strong><em>Get-View<\/em><\/strong> helps. This will return the fine detail about the cluster including its&#8217; MoRef.<\/p>\n<p><a href=\"http:\/\/virtualizeplanet.com\/wordpress\/wp-content\/uploads\/2010\/05\/Get-View.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-240\" title=\"Get-View\" src=\"http:\/\/virtualizeplanet.com\/wordpress\/wp-content\/uploads\/2010\/05\/Get-View.jpg\" alt=\"\" width=\"497\" height=\"487\" srcset=\"http:\/\/read.virtualizeplanet.com\/wp-content\/uploads\/2010\/05\/Get-View.jpg 497w, http:\/\/read.virtualizeplanet.com\/wp-content\/uploads\/2010\/05\/Get-View-300x293.jpg 300w, http:\/\/read.virtualizeplanet.com\/wp-content\/uploads\/2010\/05\/Get-View-50x50.jpg 50w\" sizes=\"auto, (max-width: 497px) 100vw, 497px\" \/><\/a><\/p>\n<p>In the script where we see <strong><em>VMware.Vim.~~~ <\/em><\/strong>this refers to the use of the VI SDK API.<\/p>\n<p>The next line sets up a custom specification of type: ClusterConfigSpecEx . A custom specification is an object which directs the SDK calls down the right road.<\/p>\n<p><strong><em>$spec = New-Object VMware.Vim.ClusterConfigSpecEx<\/em><\/strong><\/p>\n<p>So now <strong><em>$spec<\/em><\/strong> is an object in its own right with properties.<\/p>\n<p>The next thing we have to do is declare to .<strong><em>dpmconfig<\/em><\/strong> property of the <strong><em>$spec<\/em><\/strong> object as a ClusterDpmConfigInfo property.<\/p>\n<p><strong><em>$spec.dpmConfig = New-Object VMware.Vim.ClusterDpmConfigInfo<\/em><\/strong><\/p>\n<p>This will allow us to influence the properties of Clusters DPM properties.<\/p>\n<p>Now we even have properties of $spec.dpmconfig object and in our case it&#8217;s the enabled property which is of interest to us:<\/p>\n<p><strong><em>$spec.dpmConfig.enabled = $true<\/em><\/strong><\/p>\n<p>Changing this from <strong><em>$true<\/em><\/strong> to <strong><em>$false <\/em><\/strong>is the same as enabling and disabling DPM.<\/p>\n<p>The last line performs the changes.<\/p>\n<p><strong><em>$taskMoRef = $cluster.ReconfigureComputeResource_Task($spec, $true)<\/em><\/strong><\/p>\n<p>The $taskMoref is a pointer to the Task object which will perform the task based on the criteria. The criteria being \u00a0the cluster object . The task is delivered through method execution, in our case ReconfigureComputeResource. This method requires the parameters as specified in the $spec object.<\/p>\n<p>When there isn&#8217;t a relevant PowerCLI cmdlet you can fall back on calling the SDK APIs. In this example we are using the <a href=\"http:\/\/www.vmware.com\/support\/developer\/vc-sdk\/visdk400pubs\/ReferenceGuide\/vim.ComputeResource.html#reconfigureEx\">ReconfigureComputeResource<\/a> method that is available on the <a href=\"http:\/\/www.vmware.com\/support\/developer\/vc-sdk\/visdk400pubs\/ReferenceGuide\/vim.ComputeResource.html\">ComputeResource<\/a> managed object. One of the parameters for this method are passed through the <a href=\"http:\/\/www.vmware.com\/support\/developer\/vc-sdk\/visdk400pubs\/ReferenceGuide\/vim.cluster.ConfigSpecEx.html\">ClusterConfigSpecEx<\/a> object.<\/p>\n<p>Now this is a bit much to ingest for a beginner but this is something we are going to have to get used to over time.<\/p>\n<p>My best advice to you is study the following resources:<\/p>\n<p><a href=\"http:\/\/www.vmware.com\/pdf\/GettingStarted201.pdf\" target=\"_blank\">http:\/\/www.vmware.com\/pdf\/GettingStarted201.pdf<\/a><\/p>\n<p><a href=\"http:\/\/www.amazon.com\/gp\/product\/0137153635?ie=UTF8&amp;tag=doublecloudor-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0137153635\" target=\"_blank\">http:\/\/www.amazon.com\/gp\/product\/0137153635?ie=UTF8&amp;tag=doublecloudor-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0137153635<\/a><\/p>\n<p>Now back to the job in hand.<\/p>\n<p>We still need to do a bit more to fully automate this operation.<\/p>\n<p>I needed to execute the\u00a0scripts\u00a0I create by scheduling them. After saving my scripts (DPMOFF.ps1 &amp; DPMON.ps1) I used the windows scheduler (boooo, I know) to execute them at given times. To execute them, the scripts have to be passed into the <strong><em>powershell.exe<\/em><\/strong> command like so:<\/p>\n<p><strong><em>powershell.exe c:\\dpmon.ps1<\/em><\/strong><\/p>\n<p>But executing the script as shown above isn&#8217;t enough. It would fail in its current state. First of all we have to tell powershell to use the VMware API snapin with the following line:<\/p>\n<p><strong><em>Add-PSSnapin VMware.VimAutomation.Core<\/em><\/strong><\/p>\n<p>Next thing we need to do is connect to the relevant vCenter server so you don&#8217;t need to be there to manually connect:<\/p>\n<p><strong><em>Connect-VIServer -server vctest -user administrator -password passwd<\/em><\/strong><\/p>\n<p>Now on the DPMOFF (not DPMON.ps1) script I needed to make sure the hosts where out of stand-by mode:<\/p>\n<p><strong><em>Start-VMHost esx1.virtualplanet.local -RunAsync -Confirm:$false<\/em><\/strong><\/p>\n<p><strong><em>Start-VMHost esx2.virtualplanet.local -RunAsync -Confirm:$false<\/em><\/strong><\/p>\n<p>This starts each host, doesn&#8217;t prompt you for a &#8220;are you sure&#8221; question and doesn&#8217;t make the script wait until the hosts are powered.<\/p>\n<p>Job done.<\/p>\n<p>So the script looks like this:<\/p>\n<p><a href=\"http:\/\/virtualizeplanet.com\/wordpress\/wp-content\/uploads\/2010\/05\/script-finish.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-242\" title=\"script-finish\" src=\"http:\/\/virtualizeplanet.com\/wordpress\/wp-content\/uploads\/2010\/05\/script-finish.jpg\" alt=\"\" width=\"607\" height=\"160\" srcset=\"http:\/\/read.virtualizeplanet.com\/wp-content\/uploads\/2010\/05\/script-finish.jpg 607w, http:\/\/read.virtualizeplanet.com\/wp-content\/uploads\/2010\/05\/script-finish-300x79.jpg 300w\" sizes=\"auto, (max-width: 607px) 100vw, 607px\" \/><\/a><\/p>\n<p>That&#8217;s it for this lesson.<\/p>\n<p><a title=\"PowerCLI: Lesson#5\" href=\"http:\/\/read.virtualizeplanet.com\/?p=206\" target=\"_self\">Previous<\/a>\u00a0<a title=\"PowerCLI: Lesson #7 &lt; I\u2019m back in business\" href=\"http:\/\/read.virtualizeplanet.com\/?p=439\">Next<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This lesson I thought I&#8217;d talk about some realworld stuff.\u00a0 In my lab I had a need to use VMware DPM to reduce the heat my home servers where creating by shutting down 1 server while not needed. What I wanted though was to control at what point&#8217;s through the day DPM was enabled or [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,4],"tags":[],"class_list":["post-239","post","type-post","status-publish","format-standard","hentry","category-powersehll","category-vmware"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.5 - aioseo.com -->\n\t<meta name=\"description\" content=\"This lesson I thought I&#039;d talk about some realworld stuff. In my lab I had a need to use VMware DPM to reduce the heat my home servers where creating by shutting down 1 server while not needed. What I wanted though was to control at what point&#039;s through the day DPM was enabled or\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"admin\"\/>\n\t<link rel=\"canonical\" href=\"http:\/\/read.virtualizeplanet.com\/?p=239\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.5\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_GB\" \/>\n\t\t<meta property=\"og:site_name\" content=\"VirtualizePlanet | Virtualization Blog\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"PowerCLI: Lesson #6 | VirtualizePlanet\" \/>\n\t\t<meta property=\"og:description\" content=\"This lesson I thought I&#039;d talk about some realworld stuff. In my lab I had a need to use VMware DPM to reduce the heat my home servers where creating by shutting down 1 server while not needed. What I wanted though was to control at what point&#039;s through the day DPM was enabled or\" \/>\n\t\t<meta property=\"og:url\" content=\"http:\/\/read.virtualizeplanet.com\/?p=239\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2010-05-25T21:25:36+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2011-12-02T21:35:21+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"PowerCLI: Lesson #6 | VirtualizePlanet\" \/>\n\t\t<meta name=\"twitter:description\" content=\"This lesson I thought I&#039;d talk about some realworld stuff. In my lab I had a need to use VMware DPM to reduce the heat my home servers where creating by shutting down 1 server while not needed. What I wanted though was to control at what point&#039;s through the day DPM was enabled or\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/?p=239#article\",\"name\":\"PowerCLI: Lesson #6 | VirtualizePlanet\",\"headline\":\"PowerCLI: Lesson #6\",\"author\":{\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/?author=1#author\"},\"publisher\":{\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"http:\\\/\\\/virtualizeplanet.com\\\/wordpress\\\/wp-content\\\/uploads\\\/2010\\\/05\\\/initscript.jpg\",\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/?p=239\\\/#articleImage\"},\"datePublished\":\"2010-05-25T21:25:36+01:00\",\"dateModified\":\"2011-12-02T21:35:21+00:00\",\"inLanguage\":\"en-GB\",\"mainEntityOfPage\":{\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/?p=239#webpage\"},\"isPartOf\":{\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/?p=239#webpage\"},\"articleSection\":\"PowerShell Tips Corner, VMware\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/?p=239#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/?cat=4#listItem\",\"name\":\"VMware\"}},{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/?cat=4#listItem\",\"position\":2,\"name\":\"VMware\",\"item\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/?cat=4\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/?p=239#listItem\",\"name\":\"PowerCLI: Lesson #6\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/?p=239#listItem\",\"position\":3,\"name\":\"PowerCLI: Lesson #6\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/?cat=4#listItem\",\"name\":\"VMware\"}}]},{\"@type\":\"Organization\",\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/#organization\",\"name\":\"VirtualizePlanet\",\"description\":\"Virtualization Blog\",\"url\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/\"},{\"@type\":\"Person\",\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/?author=1#author\",\"url\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/?author=1\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/?p=239#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/85617dae5394055440e07c293f393ff020991f6c51f6b75c682df6cd1f5c10ad?s=96&r=g\",\"width\":96,\"height\":96,\"caption\":\"admin\"}},{\"@type\":\"WebPage\",\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/?p=239#webpage\",\"url\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/?p=239\",\"name\":\"PowerCLI: Lesson #6 | VirtualizePlanet\",\"description\":\"This lesson I thought I'd talk about some realworld stuff. In my lab I had a need to use VMware DPM to reduce the heat my home servers where creating by shutting down 1 server while not needed. What I wanted though was to control at what point's through the day DPM was enabled or\",\"inLanguage\":\"en-GB\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/#website\"},\"breadcrumb\":{\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/?p=239#breadcrumblist\"},\"author\":{\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/?author=1#author\"},\"creator\":{\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/?author=1#author\"},\"datePublished\":\"2010-05-25T21:25:36+01:00\",\"dateModified\":\"2011-12-02T21:35:21+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/#website\",\"url\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/\",\"name\":\"VirtualizePlanet\",\"description\":\"Virtualization Blog\",\"inLanguage\":\"en-GB\",\"publisher\":{\"@id\":\"http:\\\/\\\/read.virtualizeplanet.com\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"PowerCLI: Lesson #6 | VirtualizePlanet","description":"This lesson I thought I'd talk about some realworld stuff. In my lab I had a need to use VMware DPM to reduce the heat my home servers where creating by shutting down 1 server while not needed. What I wanted though was to control at what point's through the day DPM was enabled or","canonical_url":"http:\/\/read.virtualizeplanet.com\/?p=239","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/read.virtualizeplanet.com\/?p=239#article","name":"PowerCLI: Lesson #6 | VirtualizePlanet","headline":"PowerCLI: Lesson #6","author":{"@id":"http:\/\/read.virtualizeplanet.com\/?author=1#author"},"publisher":{"@id":"http:\/\/read.virtualizeplanet.com\/#organization"},"image":{"@type":"ImageObject","url":"http:\/\/virtualizeplanet.com\/wordpress\/wp-content\/uploads\/2010\/05\/initscript.jpg","@id":"http:\/\/read.virtualizeplanet.com\/?p=239\/#articleImage"},"datePublished":"2010-05-25T21:25:36+01:00","dateModified":"2011-12-02T21:35:21+00:00","inLanguage":"en-GB","mainEntityOfPage":{"@id":"http:\/\/read.virtualizeplanet.com\/?p=239#webpage"},"isPartOf":{"@id":"http:\/\/read.virtualizeplanet.com\/?p=239#webpage"},"articleSection":"PowerShell Tips Corner, VMware"},{"@type":"BreadcrumbList","@id":"http:\/\/read.virtualizeplanet.com\/?p=239#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"http:\/\/read.virtualizeplanet.com\/#listItem","position":1,"name":"Home","item":"http:\/\/read.virtualizeplanet.com\/","nextItem":{"@type":"ListItem","@id":"http:\/\/read.virtualizeplanet.com\/?cat=4#listItem","name":"VMware"}},{"@type":"ListItem","@id":"http:\/\/read.virtualizeplanet.com\/?cat=4#listItem","position":2,"name":"VMware","item":"http:\/\/read.virtualizeplanet.com\/?cat=4","nextItem":{"@type":"ListItem","@id":"http:\/\/read.virtualizeplanet.com\/?p=239#listItem","name":"PowerCLI: Lesson #6"},"previousItem":{"@type":"ListItem","@id":"http:\/\/read.virtualizeplanet.com\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"http:\/\/read.virtualizeplanet.com\/?p=239#listItem","position":3,"name":"PowerCLI: Lesson #6","previousItem":{"@type":"ListItem","@id":"http:\/\/read.virtualizeplanet.com\/?cat=4#listItem","name":"VMware"}}]},{"@type":"Organization","@id":"http:\/\/read.virtualizeplanet.com\/#organization","name":"VirtualizePlanet","description":"Virtualization Blog","url":"http:\/\/read.virtualizeplanet.com\/"},{"@type":"Person","@id":"http:\/\/read.virtualizeplanet.com\/?author=1#author","url":"http:\/\/read.virtualizeplanet.com\/?author=1","name":"admin","image":{"@type":"ImageObject","@id":"http:\/\/read.virtualizeplanet.com\/?p=239#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/85617dae5394055440e07c293f393ff020991f6c51f6b75c682df6cd1f5c10ad?s=96&r=g","width":96,"height":96,"caption":"admin"}},{"@type":"WebPage","@id":"http:\/\/read.virtualizeplanet.com\/?p=239#webpage","url":"http:\/\/read.virtualizeplanet.com\/?p=239","name":"PowerCLI: Lesson #6 | VirtualizePlanet","description":"This lesson I thought I'd talk about some realworld stuff. In my lab I had a need to use VMware DPM to reduce the heat my home servers where creating by shutting down 1 server while not needed. What I wanted though was to control at what point's through the day DPM was enabled or","inLanguage":"en-GB","isPartOf":{"@id":"http:\/\/read.virtualizeplanet.com\/#website"},"breadcrumb":{"@id":"http:\/\/read.virtualizeplanet.com\/?p=239#breadcrumblist"},"author":{"@id":"http:\/\/read.virtualizeplanet.com\/?author=1#author"},"creator":{"@id":"http:\/\/read.virtualizeplanet.com\/?author=1#author"},"datePublished":"2010-05-25T21:25:36+01:00","dateModified":"2011-12-02T21:35:21+00:00"},{"@type":"WebSite","@id":"http:\/\/read.virtualizeplanet.com\/#website","url":"http:\/\/read.virtualizeplanet.com\/","name":"VirtualizePlanet","description":"Virtualization Blog","inLanguage":"en-GB","publisher":{"@id":"http:\/\/read.virtualizeplanet.com\/#organization"}}]},"og:locale":"en_GB","og:site_name":"VirtualizePlanet | Virtualization Blog","og:type":"article","og:title":"PowerCLI: Lesson #6 | VirtualizePlanet","og:description":"This lesson I thought I'd talk about some realworld stuff. In my lab I had a need to use VMware DPM to reduce the heat my home servers where creating by shutting down 1 server while not needed. What I wanted though was to control at what point's through the day DPM was enabled or","og:url":"http:\/\/read.virtualizeplanet.com\/?p=239","article:published_time":"2010-05-25T21:25:36+00:00","article:modified_time":"2011-12-02T21:35:21+00:00","twitter:card":"summary","twitter:title":"PowerCLI: Lesson #6 | VirtualizePlanet","twitter:description":"This lesson I thought I'd talk about some realworld stuff. In my lab I had a need to use VMware DPM to reduce the heat my home servers where creating by shutting down 1 server while not needed. What I wanted though was to control at what point's through the day DPM was enabled or"},"aioseo_meta_data":{"post_id":"239","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-02-10 12:18:18","updated":"2026-01-19 10:05:27","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"http:\/\/read.virtualizeplanet.com\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"http:\/\/read.virtualizeplanet.com\/?cat=4\" title=\"VMware\">VMware<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tPowerCLI: Lesson #6\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"http:\/\/read.virtualizeplanet.com\/"},{"label":"VMware","link":"http:\/\/read.virtualizeplanet.com\/?cat=4"},{"label":"PowerCLI: Lesson #6","link":"http:\/\/read.virtualizeplanet.com\/?p=239"}],"views":11110,"_links":{"self":[{"href":"http:\/\/read.virtualizeplanet.com\/index.php?rest_route=\/wp\/v2\/posts\/239","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/read.virtualizeplanet.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/read.virtualizeplanet.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/read.virtualizeplanet.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/read.virtualizeplanet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=239"}],"version-history":[{"count":9,"href":"http:\/\/read.virtualizeplanet.com\/index.php?rest_route=\/wp\/v2\/posts\/239\/revisions"}],"predecessor-version":[{"id":588,"href":"http:\/\/read.virtualizeplanet.com\/index.php?rest_route=\/wp\/v2\/posts\/239\/revisions\/588"}],"wp:attachment":[{"href":"http:\/\/read.virtualizeplanet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=239"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/read.virtualizeplanet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=239"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/read.virtualizeplanet.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}