<?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: -RunAsync available with Remove-Host? in vSphere Update Manager PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150121#M478</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PowerCLI C:\Scripts\vCenter\migration&amp;gt; foreach ($vmhost in $CSVhosts) {remove-vmhost -VMhost $vmhost.name -confirm:$fals&lt;/P&gt;&lt;P&gt;e -RunAsync}&lt;/P&gt;&lt;P&gt;Remove-VMHost : A parameter cannot be found that matches parameter name 'RunAsync'.&lt;/P&gt;&lt;P&gt;At line:1 char:84&lt;/P&gt;&lt;P&gt;+ ... confirm:$false -RunAsync}&lt;/P&gt;&lt;P&gt;+&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ~~~~~~~~~&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; : InvalidArgument: (:) [Remove-VMHost], ParameterBindingException&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + FullyQualifiedErrorId : NamedParameterNotFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.RemoveVMHost&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 May 2014 17:53:35 GMT</pubDate>
    <dc:creator>mark_chuman</dc:creator>
    <dc:date>2014-05-29T17:53:35Z</dc:date>
    <item>
      <title>-RunAsync available with Remove-Host?</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150120#M477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seems to work fine with set-vmhost, but not sure why it doesn't seem available with remove-host?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2014 17:48:23 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150120#M477</guid>
      <dc:creator>mark_chuman</dc:creator>
      <dc:date>2014-05-29T17:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: -RunAsync available with Remove-Host?</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150121#M478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PowerCLI C:\Scripts\vCenter\migration&amp;gt; foreach ($vmhost in $CSVhosts) {remove-vmhost -VMhost $vmhost.name -confirm:$fals&lt;/P&gt;&lt;P&gt;e -RunAsync}&lt;/P&gt;&lt;P&gt;Remove-VMHost : A parameter cannot be found that matches parameter name 'RunAsync'.&lt;/P&gt;&lt;P&gt;At line:1 char:84&lt;/P&gt;&lt;P&gt;+ ... confirm:$false -RunAsync}&lt;/P&gt;&lt;P&gt;+&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ~~~~~~~~~&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; : InvalidArgument: (:) [Remove-VMHost], ParameterBindingException&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + FullyQualifiedErrorId : NamedParameterNotFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.RemoveVMHost&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2014 17:53:35 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150121#M478</guid>
      <dc:creator>mark_chuman</dc:creator>
      <dc:date>2014-05-29T17:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: -RunAsync available with Remove-Host?</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150122#M479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why the RunAsync is not available on the Remove-VMHost cmdlet, I don't know.&lt;/P&gt;&lt;P&gt;The PowerCLI DEV Team must have had their reasons, or perhaps it is something historical.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you can do this&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;$esx = Get-VMHost -Name MyEsx&lt;/P&gt;
&lt;P&gt;$esx.ExtensionData.Destroy_Task()&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;The methods with _Task at the end, launch the action and then return.&lt;/P&gt;&lt;P&gt;They do not wait for the end of the requested action.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2014 18:57:37 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150122#M479</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2014-05-29T18:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: -RunAsync available with Remove-Host?</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150123#M480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Luc.&amp;nbsp; Any idea how to get this into a foreach loop?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$CSVhosts = Import-Csv .\$OldvCenters\$Cluster\VMHost.csv&lt;/P&gt;&lt;P&gt;$esx = Get-VMHost -Name $CSVhosts.name&lt;/P&gt;&lt;P&gt;foreach ($vmshost in $CSVhosts) {$esx.ExtenionData.Destroy_Task()}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Results in:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Action to take for this exception:&lt;/P&gt;&lt;P&gt;You cannot call a method on a null-valued expression.&lt;/P&gt;&lt;P&gt;[C] Continue&amp;nbsp; [I] Silently Continue&amp;nbsp; [B] Break&amp;nbsp; [S] Suspend&amp;nbsp; [?] Help (default is "C"): C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what i was using before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$CSVhosts = Import-Csv .\$OldvCenters\$Cluster\VMHost.csv&lt;/P&gt;&lt;P&gt;foreach ($vmhost in $CSVhosts) {Remove-VMHost -VMHost $vmhost.name -confirm:$false}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sure I'm mutilating this one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2014 19:52:35 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150123#M480</guid>
      <dc:creator>mark_chuman</dc:creator>
      <dc:date>2014-05-29T19:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: -RunAsync available with Remove-Host?</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150124#M481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;Import-Csv .\$OldvCenters\$Cluster\VMHost.csv | %{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; $esx = Get-VMHost -Name $_.name&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; $esx.ExtenionData.Destroy_Task()&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2014 20:48:41 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150124#M481</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2014-05-29T20:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: -RunAsync available with Remove-Host?</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150125#M482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, it's official.&amp;nbsp; I've started including "lucd" in google searches for scripts instead of "powercli".&amp;nbsp; Many thanks for the help over the years!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2014 16:44:30 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150125#M482</guid>
      <dc:creator>mark_chuman</dc:creator>
      <dc:date>2014-06-02T16:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: -RunAsync available with Remove-Host?</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150126#M483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry to bring up a dead post, but can you try this Luc and see if you get the same results?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;You cannot call a method on a null-valued expression.&lt;/P&gt;&lt;P style="margin: 2px; font-size: 14px; font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;[C] Continue&amp;nbsp; [I] Silently Continue&amp;nbsp; [B] Break&amp;nbsp; [S] Suspend&amp;nbsp; [?] Help (default is "C"): C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 20:15:13 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150126#M483</guid>
      <dc:creator>mark_chuman</dc:creator>
      <dc:date>2014-06-23T20:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: -RunAsync available with Remove-Host?</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150127#M484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems that $esx doesn't hold a VMhost object.&lt;/P&gt;&lt;P&gt;Are there any blank lines in the CSV perhaps (an extra &amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt; at the end of file) ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 05:29:50 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150127#M484</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2014-06-24T05:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: -RunAsync available with Remove-Host?</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150128#M485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting.&amp;nbsp; The csv contents look good and the write-host is spitting out the correct name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$SourcevCenter = "vcenter name"&lt;/P&gt;&lt;P&gt;$Cluster = "cluster name"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Import-Csv .\$SourcevCenter\$Cluster\VMHost.csv | %{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; $esx = Get-VMHost -Name $_.name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Write-Host $esx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; $esx.ExtenionData.Destroy_Task()&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additional notes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I intentionally input an incorrect server name into the csv I receive and additional error regarding the host not being found, but this is coming from the "Get-VMHost" when setting the $esx variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get-VMHost : 06/24/2014 8:49:55 AM&amp;nbsp;&amp;nbsp;&amp;nbsp; Get-VMHost&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VMHost with name 'incorrect server name' was not found using the specified filter(s).&lt;/P&gt;&lt;P&gt;At C:\Scripts\Working\Evaluating\loop.ps1:6 char:11&lt;/P&gt;&lt;P&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; $esx = Get-VMHost -Name $_.name&lt;/P&gt;&lt;P&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ~~~~~~~~~~~~~~~~~~~~~~~~&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; : ObjectNotFound: (:) [Get-VMHost], VimException&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVMHost&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 12:52:11 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150128#M485</guid>
      <dc:creator>mark_chuman</dc:creator>
      <dc:date>2014-06-24T12:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: -RunAsync available with Remove-Host?</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150129#M486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could it be that you have a powered down or "ghost" ESXi server in your environment ?&lt;/P&gt;&lt;P&gt;Does&lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;Import-Csv .\$SourcevCenter\$Cluster\VMHost.csv | %{&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get-VMHost -Name $_.Name | Select Name, ConnectionState,PowerState&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;&lt;P&gt;give any additional clues ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 13:47:21 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150129#M486</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2014-06-24T13:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: -RunAsync available with Remove-Host?</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150130#M487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The computers must laugh at us humans &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.vmware.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extension (with an S).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 13:57:07 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/RunAsync-available-with-Remove-Host/m-p/2150130#M487</guid>
      <dc:creator>mark_chuman</dc:creator>
      <dc:date>2014-06-24T13:57:07Z</dc:date>
    </item>
  </channel>
</rss>

