<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: changing vm storage drs automation level in VMware PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393655#M6877</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting below errors while running this script, though sometimes it do the changes in VM SDRS automation but throwing this error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exception calling "ConfigureStorageDrsForPod" with "3" argument(s): "The object has already been deleted or has not been completely created"&lt;/P&gt;&lt;P&gt;At line:1 char:1&lt;/P&gt;&lt;P&gt;+ $storMgr.ConfigureStorageDrsForPod($pod.ExtensionData.MoRef,$spec,$true)&lt;/P&gt;&lt;P&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + CategoryInfo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : NotSpecified: (:) [], MethodInvocationException&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + FullyQualifiedErrorId : VimException&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Aug 2013 11:53:13 GMT</pubDate>
    <dc:creator>rajan2a</dc:creator>
    <dc:date>2013-08-08T11:53:13Z</dc:date>
    <item>
      <title>changing vm storage drs automation level</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393638#M6860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;As per &lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://communities.vmware.com/message/2172311#2172311"&gt;http://communities.vmware.com/message/2172311#2172311&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using LucD's method, to extract a list of vm's that have vm's turned on&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;function Get-StoragePod{&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;lt;#&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;.SYNOPSIS&amp;nbsp; Find a DatastoreCluster&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;.DESCRIPTION The function will return a StoragePod object.&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp; This is the server-side object used by vSphere for a&amp;nbsp; DatastoreCluster.&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;.NOTES&amp;nbsp; Author:&amp;nbsp; Luc Dekens&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;.PARAMETER Name&amp;nbsp; The name of the DatastoreCluster&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;.EXAMPLE&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp; PS&amp;gt; Get-StoragePod&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;.EXAMPLE&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp; PS&amp;gt; Get-StoragePod -Name "SDC*"&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;#&amp;gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp; param(&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp; [CmdletBinding()]&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp; [parameter(Position = 0, ValueFromPipeline = $true)]&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp; [string]$Name = "*"&amp;nbsp; )&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt; &lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp; begin{&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp; function Get-StoragePodInternal{&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; param(&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [CmdletBinding()]&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [parameter(Mandatory = $true,ValueFromPipeline = $true)]&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [VMware.Vim.Folder]$Folder&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt; &lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $Folder.ChildEntity | %{&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if($_.Type -eq "StoragePod"){&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get-View -Id $_&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elseif($_.Type -eq "Folder"){&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get-View -Id $_ | Get-StoragePodInternal&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp; }&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt; &lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp; process{&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get-Folder -Name datastore | %{&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get-StoragePodInternal -Folder $_.ExtensionData&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } | where {$_.Name -like $Name}&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp; }&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;}&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt; &lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;$dsc = Get-StoragePod -Name $datastorecluster&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;$vmlist = $dsc.PodStorageDrsEntry.StorageDrsConfig.VmConfig | where {$_.Enabled -notmatch "False"} | Select @{N="VM";E={(Get-View $_.VM).Name}},Enabled,IntraVmAffinity | where {$_.VM -like "*_replica"}&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt; &lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This successfully gets a list of vm's that have sdrs enabled that shouldnt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm struggling with how to disable sdrs.&amp;nbsp; I'm new to powershell&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from what i can gather i need to update dsc.podstoragedrsentry.storagedrsconfig.vmconfig.enabled to False.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i'm unsure how to do this, or could point me in the right direction?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2013 05:59:30 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393638#M6860</guid>
      <dc:creator>Onthax</dc:creator>
      <dc:date>2013-01-07T05:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: changing vm storage drs automation level</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393639#M6861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will have to use the ConfigureStorageDrsForPod_Task method to change the settings for SDRS.&lt;/P&gt;&lt;P&gt;In the &lt;A href="http://pubs.vmware.com/vsphere-50/topic/com.vmware.wssdk.apiref.doc_50/vim.storageDrs.ConfigSpec.html"&gt;StorageDrsConfigSpec&lt;/A&gt; object you can disable this.&lt;/P&gt;&lt;P&gt;Combined with your Where-clause this could be something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #800080;"&gt;$storMgr&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #FF0000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #5F9EA0;"&gt;Get-View&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000FF;"&gt;StorageResourceManager&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;&lt;BR /&gt;$pod&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #FF0000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #5F9EA0;"&gt;Get-DatastoreCluster&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #5F9EA0;"&gt;-Name&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;$datastorecluster&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;&lt;BR /&gt;$spec&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #FF0000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #5F9EA0;"&gt;New-Object&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #8B4513;"&gt;VMware.Vim.StorageDrsConfigSpec&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; 

&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;$pod&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #8B4513;"&gt;ExtensionData&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #8B4513;"&gt;PodStorageDrsEntry&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #8B4513;"&gt;StorageDrsConfig&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #8B4513;"&gt;VmConfig&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000FF;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; 
&lt;/SPAN&gt;&lt;SPAN style="color: #0000FF;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; {(&lt;/SPAN&gt;&lt;SPAN style="color: #5F9EA0;"&gt;Get-View&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000080;"&gt;$_&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #8B4513;"&gt;VM&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000FF;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000FF;"&gt;Select&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #5F9EA0;"&gt;-ExpandProperty&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000FF;"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #FF0000;"&gt;-like&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;"*_replica"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000FF;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #FF0000;"&gt;%&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;{
&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;$entry&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #FF0000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #5F9EA0;"&gt;New-Object&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #8B4513;"&gt;VMware.Vim.StorageDrsVmConfigSpec&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;$entry&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #8B4513;"&gt;Operation&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #FF0000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;"edit"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;$entry&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #8B4513;"&gt;Info&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #FF0000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000080;"&gt;$_&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;$entry&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #8B4513;"&gt;Info&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #8B4513;"&gt;Enabled&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #FF0000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000FF;"&gt;$false&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;$spec&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #8B4513;"&gt;vmConfigSpec&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #FF0000;"&gt;+=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;$entry&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;}

&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;$storMgr&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #8B4513;"&gt;ConfigureStorageDrsForPod&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;$pod&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #8B4513;"&gt;ExtensionData&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #8B4513;"&gt;MoRef&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;$spec&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000FF;"&gt;$true&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that the &lt;A href="http://www.vmware.com/support/developer/PowerCLI/PowerCLI51/html/Get-DatastoreCluster.html"&gt;Get-DatastoreCluster&lt;/A&gt; cmdlet can be used to replace my function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2013 08:48:41 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393639#M6861</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2013-01-07T08:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: changing vm storage drs automation level</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393640#M6862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cheers Mate!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's just what i needed, need to learn a bit more powershell to fully follow how to replicate how you did this but thanks :^)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 05:46:43 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393640#M6862</guid>
      <dc:creator>Onthax</dc:creator>
      <dc:date>2013-01-08T05:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: changing vm storage drs automation level</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393641#M6863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As a matter of fact this is PowerShell/PowerCLI using one the SDK API to change the settings.&lt;/P&gt;&lt;P&gt;Not all vSphere API are available through PowerCLI cmdlets, but it is quite easy to call the SDK API directly from within PowerCLI/PowerShell.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jan 2013 08:22:54 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393641#M6863</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2013-01-08T08:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: changing vm storage drs automation level</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393642#M6864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This script seemed to be working as expected, but recently I noticed that New VM's that are added to the datastore cluster won't appear when you run &lt;SPAN style="font-style: inherit; font-family: inherit; color: #800080;"&gt;$pod&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; color: #8b4513;"&gt;ExtensionData&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; color: #8b4513;"&gt;PodStorageDrsEntry&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; color: #8b4513;"&gt;StorageDrsConfig&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; color: #8b4513;"&gt;VmConfig&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't been able to get them detected and working, Does anyone know if there is anything that needs to be done after adding a vm to have it appear from powercli when looking at members of a SDRS cluster?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 06:51:26 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393642#M6864</guid>
      <dc:creator>Onthax</dc:creator>
      <dc:date>2013-05-07T06:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: changing vm storage drs automation level</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393643#M6865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suspect that the new information is not present.&lt;/P&gt;&lt;P&gt;Remember that the objects you get in PowerCLI are read-only copies.&lt;/P&gt;&lt;P&gt;You can force a refresh with&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; color: #800080;"&gt;$pod&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; color: #8b4513;"&gt;ExtensionData.UpdateViewData()&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; color: #8b4513;"&gt;&lt;SPAN style="color: #000000;"&gt;Does that help ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 May 2013 11:10:52 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393643#M6865</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2013-05-07T11:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: changing vm storage drs automation level</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393644#M6866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick response LucD&lt;/P&gt;&lt;P&gt;No luck, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ran &lt;SPAN style="font-style: inherit; font-size: 12px; font-family: inherit; color: #800080;"&gt;$pod&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 12px; font-family: inherit; color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 12px; font-family: inherit; color: #8b4513;"&gt;ExtensionData.UpdateViewData()&lt;/SPAN&gt; then&amp;nbsp; $pod.ExtensionData.PodStorageDrsEntry.StorageDrsConfig.VmConfig&lt;/P&gt;&lt;P&gt;the new VM won't show in powercli, however shows fine in GUI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea on how often it refreshes?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2013 01:57:45 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393644#M6866</guid>
      <dc:creator>Onthax</dc:creator>
      <dc:date>2013-05-08T01:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: changing vm storage drs automation level</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393645#M6867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The PowerCLI object does not refresh, unless you do an UpdateViewData.&lt;/P&gt;&lt;P&gt;Did you try fetching the datastorecluster object again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080;"&gt;$pod&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #5f9ea0;"&gt;Get-DatastoreCluster&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #5f9ea0;"&gt;-Name&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;$datastorecluster&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2013 04:55:09 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393645#M6867</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2013-05-08T04:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: changing vm storage drs automation level</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393646#M6868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having the same problem where newly added VMs to the datastore cluster failed to show up in ~StorageDrsConfig.VmConfig.&amp;nbsp; One way I've found to get them to show up is to enable/disable storage DRS from vSphere Client on the datastore cluster.&amp;nbsp; For some reason, after doing that from the vSphere GUI, the VMs show up then in ~StorageDrsConfig.VmConfig.&amp;nbsp; I tried using Set-DatastoreCluster to change the sdrsautomationlevel to manual / disabled, but no luck in getting the VMs to show up.&amp;nbsp; So far, only after editing the datastore cluster settings from vSphere client.&amp;nbsp; Not sure if it might be an issue with the vCenter Server not passing the information along or what.&amp;nbsp; I'd be curious to know what versions you're using.&amp;nbsp; I'm using ESXi 5.1U1, vCenter Server 5.1U1, and PowerCLI 5.1 release 1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 19:11:33 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393646#M6868</guid>
      <dc:creator>Cruckman4</dc:creator>
      <dc:date>2013-05-09T19:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: changing vm storage drs automation level</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393647#M6869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The changes you make in vCenter are not automatically done in your PowerCLI variables.&lt;/P&gt;&lt;P&gt;You will have to get the object again, or refresh the ExtensionData property with the UpdateViewData method.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 20:41:22 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393647#M6869</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2013-05-09T20:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: changing vm storage drs automation level</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393648#M6870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, forgot to mention that I re-fetched the datastore cluster object after adding VMs to it, and also after changing the sdrsautomationlevel with Set-DatastoreCluster. Unfortunately, it still had nothing in ~.StorageDrsConfig.VmConfig.&amp;nbsp; Only after making the changes in vCenter and getting the object again after making the changes did the VMs finally show up in ~.StorageDrsConfig.VmConfig.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 21:12:32 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393648#M6870</guid>
      <dc:creator>Cruckman4</dc:creator>
      <dc:date>2013-05-09T21:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: changing vm storage drs automation level</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393649#M6871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The ExtensionData property is handled a bit differently, compared to regular PowerShell variables and their properties.&lt;/P&gt;&lt;P&gt;Did you also try with the &lt;STRONG&gt;UpdateViewData&lt;/STRONG&gt; method as I suggested ?&lt;/P&gt;&lt;P&gt;It might be a caching problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 21:15:49 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393649#M6871</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2013-05-09T21:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: changing vm storage drs automation level</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393650#M6872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, I tried that too to no avail &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.vmware.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 21:19:55 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393650#M6872</guid>
      <dc:creator>Cruckman4</dc:creator>
      <dc:date>2013-05-09T21:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: changing vm storage drs automation level</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393651#M6873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll check if I can reproduce that&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 21:37:13 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393651#M6873</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2013-05-09T21:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: changing vm storage drs automation level</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393652#M6874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi LucD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried $pod.ExtensionData.PodStorageDrsEntry.StorageDrsConfig.VmConfig&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;$pod.ExtensionData.UpdateViewData()&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;$pod = Get-DatastoreCluster -Name $datastorecluster&lt;/P&gt;&lt;P&gt;The VM still doesnt appear when I do a $pod.ExtensionData.PodStorageDrsEntry.StorageDrsConfig.VmConfig&lt;/P&gt;&lt;P&gt;VM was added more than a week ago, so it doesnt seem to be an internal refresh timer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 07:46:09 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393652#M6874</guid>
      <dc:creator>Onthax</dc:creator>
      <dc:date>2013-05-14T07:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: changing vm storage drs automation level</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393653#M6875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did some more tests, and I can confirm the behavior you are seeing.&lt;/P&gt;&lt;P&gt;When a new VM is created on the datastorecluster it is not automatically added to the &lt;STRONG&gt;VmConfig&lt;/STRONG&gt; array as a &lt;A href="http://pubs.vmware.com/vsphere-50/topic/com.vmware.wssdk.apiref.doc_50/vim.storageDrs.VmConfigInfo.html"&gt;StorageDrsVmConfigInfo&lt;/A&gt; entry.&lt;/P&gt;&lt;P&gt;The fact that you see it in the vSphere client is due to the defaults (see for example the description of the &lt;STRONG&gt;enabled&lt;/STRONG&gt; property).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if this is intentional or a "feature".&lt;/P&gt;&lt;P&gt;My guess is that this is intentional, as long as you don't divert from the defaults, there is no need to create an entry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps some SDRS wizard can shine his light on this ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 09:29:21 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393653#M6875</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2013-05-14T09:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: changing vm storage drs automation level</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393654#M6876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just checking tho, there is no way to update this from the VM side?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 04:41:31 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393654#M6876</guid>
      <dc:creator>Onthax</dc:creator>
      <dc:date>2013-05-23T04:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: changing vm storage drs automation level</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393655#M6877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting below errors while running this script, though sometimes it do the changes in VM SDRS automation but throwing this error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exception calling "ConfigureStorageDrsForPod" with "3" argument(s): "The object has already been deleted or has not been completely created"&lt;/P&gt;&lt;P&gt;At line:1 char:1&lt;/P&gt;&lt;P&gt;+ $storMgr.ConfigureStorageDrsForPod($pod.ExtensionData.MoRef,$spec,$true)&lt;/P&gt;&lt;P&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + CategoryInfo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : NotSpecified: (:) [], MethodInvocationException&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + FullyQualifiedErrorId : VimException&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Aug 2013 11:53:13 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393655#M6877</guid>
      <dc:creator>rajan2a</dc:creator>
      <dc:date>2013-08-08T11:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: changing vm storage drs automation level</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393656#M6878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi rajan.&amp;nbsp; I am getting the same errors occasionally though, as you say, sometimes the rule gets correctly created.&amp;nbsp; Have you found any workaround or root cause?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2013 19:13:27 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393656#M6878</guid>
      <dc:creator>jesse_gardner</dc:creator>
      <dc:date>2013-09-16T19:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: changing vm storage drs automation level</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393657#M6879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry to update this thread, but I need to put all my automation level to 'default'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When VM are in Default mode, seems that everything is empty, example:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;EM&gt;Vm&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/TD&gt;&lt;TD&gt;&lt;EM&gt;: VirtualMachine-vm-13297&lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;EM&gt;Enabled&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/TD&gt;&lt;TD&gt;&lt;EM&gt;:&lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;EM&gt;Behavior&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/TD&gt;&lt;TD&gt;&lt;EM&gt;:&lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;EM&gt;IntraVmAffinity &lt;/EM&gt;&lt;/TD&gt;&lt;TD&gt;&lt;EM&gt;:&lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;EM&gt;IntraVmAntiAffinity :&lt;/EM&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;EM&gt;LinkedView&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/TD&gt;&lt;TD&gt;&lt;EM&gt;:&lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;EM&gt;DynamicType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/TD&gt;&lt;TD&gt;&lt;EM&gt;:&lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;EM&gt;DynamicProperty &lt;/EM&gt;&lt;/TD&gt;&lt;TD&gt;&lt;EM&gt;:&lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I Try to do the same thing with a &lt;EM&gt;StorageDrsVmConfigSpec&lt;/EM&gt;:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13849532677964528" jivemacro_uid="_13849532677964528"&gt;
&lt;P&gt;$storMgr = Get-View StorageResourceManager&lt;/P&gt;
&lt;P&gt;$spec = New-Object VMware.Vim.StorageDrsConfigSpec&lt;/P&gt;
&lt;P&gt;$dsc = Get-Datastorecluster DS1&lt;/P&gt;
&lt;P&gt;$dsc.ExtensionData.PodStorageDrsEntry.StorageDrsConfig.VmConfig |%{&lt;/P&gt;
&lt;P&gt;$entry = New-Object VMware.Vim.StorageDrsVmConfigSpec&lt;/P&gt;
&lt;P&gt;$entry.Operation = "edit"&lt;/P&gt;
&lt;P&gt;$entry.Info = $_&lt;/P&gt;
&lt;P&gt;$entry.Info.Enabled = ""&lt;/P&gt;
&lt;P&gt;$entry.Info.Behavior = ""&lt;/P&gt;
&lt;P&gt;$entry.Info.IntraVMAffinity = ""&lt;/P&gt;
&lt;P&gt;$spec.vmConfigSpec += $entry&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;$storMgr.ConfigureStorageDrsForPod($dsc.ExtensionData.MoRef,$spec,$true)&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But ... no luck:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Exception calling "ConfigureStorageDrsForPod" with "3" argument(s): "A specified parameter was not correct.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;spec"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Any idea ? &lt;img class="lia-deferred-image lia-image-emoji" src="https://communities.vmware.com/html/@DCF4E2F7991292CEECF250394DB2C2BC/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 12:19:31 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/changing-vm-storage-drs-automation-level/m-p/393657#M6879</guid>
      <dc:creator>cans</dc:creator>
      <dc:date>2013-11-20T12:19:31Z</dc:date>
    </item>
  </channel>
</rss>

