<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/clearspace/rss" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>VMware Communities : Thread List - VMware vSphere™ PowerCLI</title>
    <link>http://communities.vmware.com/community/vmtn/vsphere/automationtools/windows_toolkit?view=discussions</link>
    <description>Latest Forum Threads in VMware vSphere™ PowerCLI</description>
    <language>en</language>
    <pubDate>Mon, 23 Nov 2009 07:18:20 GMT</pubDate>
    <generator>Clearspace 1.10.12 (http://jivesoftware.com/products/clearspace/)</generator>
    <dc:date>2009-11-23T07:18:20Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Get-Cluster - CPU Usage 95%</title>
      <link>http://communities.vmware.com/thread/243782</link>
      <description>Get-Cluster appears to be an expensive query, on the VC, CPU usage goes as high as 95% (for vmxd.exe) when using get-cluster, otherwise it is fine.&lt;br /&gt;
&lt;br /&gt;
Is there any workaround to avoid this, or an equivalent SDK method ?&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;Get-VM | %{
   Get-Cluster -vm $_.Name
}
&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Mon, 23 Nov 2009 07:18:20 GMT</pubDate>
      <author>harkamal</author>
      <guid>http://communities.vmware.com/thread/243782</guid>
      <dc:date>2009-11-23T07:18:20Z</dc:date>
      <clearspace:dateToText>18 hours, 48 minutes ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>Need a powershell script to collect esx patch info</title>
      <link>http://communities.vmware.com/thread/243671</link>
      <description>&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;p /&gt;
 Iam looking for a powershell script which collects result of  "esxupdate query" for all esx host version 3.5 in the Virtual center version 2.5 and exports to CSV file.&lt;br /&gt;
&lt;p /&gt;
It should take input as virtual center and collect all the ESX host info, log in to esx hosts, run &lt;i&gt;esxupdate query&lt;/i&gt; and update the csv file with results. &lt;br /&gt;
&lt;p /&gt;
 I got the basic code from other script. i have pasted it below. This just collects the results for esx server given and need to alter the code for requirement as given above.&lt;br /&gt;
&lt;p /&gt;
&lt;hr /&gt;
&lt;p /&gt;
&lt;br /&gt;
$servers=&amp;rdquo;server0&amp;Prime;,&amp;rdquo;server1&amp;Prime;&lt;br /&gt;
&lt;p /&gt;
$account=&amp;rdquo;root&amp;rdquo;&lt;br /&gt;
$password=&amp;rdquo;password&amp;rdquo;&lt;br /&gt;
&lt;p /&gt;
$servers | % { $a=plink -pw $password $account@$_ &amp;ldquo;esxupdate query&amp;rdquo;&lt;br /&gt;
&lt;p /&gt;
$server=$_}&lt;br /&gt;
&lt;p /&gt;
&lt;hr /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Thanks in advance!</description>
      <pubDate>Sun, 22 Nov 2009 00:16:45 GMT</pubDate>
      <author>Sureshadmin</author>
      <guid>http://communities.vmware.com/thread/243671</guid>
      <dc:date>2009-11-22T00:16:45Z</dc:date>
      <clearspace:dateToText>18 hours, 51 minutes ago</clearspace:dateToText>
      <clearspace:messageCount>2</clearspace:messageCount>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>Historical performance using VI tool kit</title>
      <link>http://communities.vmware.com/thread/243453</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
I'm trying to generate the Mem &amp;#38; CPU performance of the VM's. Attached is the script, It should create a .Net datatable at the end and should be displayed as a output. The script is executed without any error, but the output is not getting displayed. &lt;br /&gt;
&lt;br /&gt;
Any help is appreciated.&lt;br /&gt;
&lt;br /&gt;
Thanks</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">reporting</category>
      <pubDate>Fri, 20 Nov 2009 10:06:07 GMT</pubDate>
      <author>Rajeev S</author>
      <guid>http://communities.vmware.com/thread/243453</guid>
      <dc:date>2009-11-20T10:06:07Z</dc:date>
      <clearspace:dateToText>2 days, 1 hour ago</clearspace:dateToText>
      <clearspace:messageCount>4</clearspace:messageCount>
      <clearspace:replyCount>3</clearspace:replyCount>
    </item>
    <item>
      <title>Question about Get-View</title>
      <link>http://communities.vmware.com/thread/243587</link>
      <description>Note:&lt;br /&gt;
  I'm using () instead of brackets because this page doesn't like brackets.&lt;br /&gt;
&lt;br /&gt;
Hi&lt;br /&gt;
&lt;br /&gt;
For some reason when I use the following code:&lt;br /&gt;
&lt;br /&gt;
Get-VM | Get-View | % {&lt;br /&gt;
 $_.CustomFields("Barcode")&lt;br /&gt;
&lt;br /&gt;
 I get a Cannot index into a null array error. &lt;br /&gt;
&lt;br /&gt;
But... if I use this code:&lt;br /&gt;
&lt;br /&gt;
$Vms = Get-VM &lt;br /&gt;
    foreach($vm in $vms)  {&lt;br /&gt;
$Vm.CustomFields("Barcode")&lt;br /&gt;
 }&lt;br /&gt;
It takes longer but it works with no errors.&lt;br /&gt;
&lt;br /&gt;
Does anyone know why this is? Is there a known issue with the Get-View cmdlet?&lt;br /&gt;
&lt;br /&gt;
Thanks</description>
      <pubDate>Sat, 21 Nov 2009 01:06:47 GMT</pubDate>
      <author>AGFlora</author>
      <guid>http://communities.vmware.com/thread/243587</guid>
      <dc:date>2009-11-21T01:06:47Z</dc:date>
      <clearspace:dateToText>2 days, 4 hours ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Relating Disk partitions to vmdk files</title>
      <link>http://communities.vmware.com/thread/242830</link>
      <description>I am trying to relate disk partitions back to the VMDK file that they are stored on and ultimately the datastore the vmdk file is stored on, can anyone think of a way to relate the partition information back to the vmdk file it is stored on ?  Here is what I have so far:&lt;br /&gt;
&lt;p /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;$AllVMs = Get-View -ViewType VirtualMachine | Where {-not $_.Config.Template}
$SortedVMs = $AllVMs | Select *, @{N=&amp;quot;NumDisks&amp;quot;;E={@($_.Guest.Disk.Length)}} | Sort NumDisks -Descending
$MyCol = @()
ForEach ($VM in $SortedVMs){
	$Details = New-object PSObject
	$Details | Add-Member -Name Name -Value $VM.name -Membertype NoteProperty
	$DiskNum = 0
	Foreach ($disk in $VM.Guest.Disk){
		$Details | Add-Member -Name &amp;quot;Disk$($DiskNum)path&amp;quot; -MemberType NoteProperty -Value $Disk.DiskPath
		$Details | Add-Member -Name &amp;quot;Disk$($DiskNum)Capacity(MB)&amp;quot; -MemberType NoteProperty -Value ([math]::Round($disk.Capacity/ 1MB))
		$Details | Add-Member -Name &amp;quot;Disk$($DiskNum)FreeSpace(MB)&amp;quot; -MemberType NoteProperty -Value ([math]::Round($disk.FreeSpace / 1MB))
		$DiskNum++
	}
	$MyCol += $Details
}
$MyCol
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
Alan Renouf&lt;br /&gt;
&lt;a class="jive-link-external" href="http://virtu-al.net"&gt;http://virtu-al.net&lt;/a&gt;</description>
      <pubDate>Tue, 17 Nov 2009 11:08:26 GMT</pubDate>
      <author>alanrenouf</author>
      <guid>http://communities.vmware.com/thread/242830</guid>
      <dc:date>2009-11-17T11:08:26Z</dc:date>
      <clearspace:dateToText>2 days, 5 hours ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>extend a vmdk\windows hard drive via powershell</title>
      <link>http://communities.vmware.com/thread/243591</link>
      <description>Id like to know if its possible to write a script that will extend the vmdk to a specified size , and then extend the windows "d:" drive based off an alarm?&lt;br /&gt;
&lt;br /&gt;
Id like to have a vcenter alarm for 5% disk space, then expand the windows partitiion and send the admins an email that this took place.</description>
      <pubDate>Sat, 21 Nov 2009 03:25:43 GMT</pubDate>
      <author>kwharrisit</author>
      <guid>http://communities.vmware.com/thread/243591</guid>
      <dc:date>2009-11-21T03:25:43Z</dc:date>
      <clearspace:dateToText>2 days, 8 hours ago</clearspace:dateToText>
      <clearspace:messageCount>2</clearspace:messageCount>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>Help with few steps in Post configuration of esx4i server</title>
      <link>http://communities.vmware.com/thread/243376</link>
      <description>Hello,&lt;br /&gt;
&lt;br /&gt;
I'm currently in the process of finishing up my post config powershell script but i do have 2 questions/issues that i'm trying to resolve.&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
First one is: &lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
Is it possible to restart the host in the middle of a configuration script and have the script wait until host is restarted?  I would like to set up all my networking, restart the host to make sure everything saves correctly.  then finish the rest of my script.&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
My second quesiton/issue is how do I run vCLI commands from powerCLI?  We have HP Blades so after esx4i setup we need to install HP CIM stuff.  this is fairly easy to do and we handle it via vihostupdate.pl script in vCLI.  my quesiton is how can I run it and call vihostupdate.pl from powershell script?&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
thanks&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
alex</description>
      <pubDate>Thu, 19 Nov 2009 21:09:55 GMT</pubDate>
      <author>kalex</author>
      <guid>http://communities.vmware.com/thread/243376</guid>
      <dc:date>2009-11-19T21:09:55Z</dc:date>
      <clearspace:dateToText>2 days, 10 hours ago</clearspace:dateToText>
      <clearspace:messageCount>18</clearspace:messageCount>
      <clearspace:replyCount>17</clearspace:replyCount>
    </item>
    <item>
      <title>Getting Cluster Name of VM</title>
      <link>http://communities.vmware.com/thread/242404</link>
      <description>Hello,&lt;br /&gt;
&lt;br /&gt;
I've got a simple inventory query setup that pulls back all of the virtual machines in vCenter. Is there any easy way to get the cluster name that the VM resides in? I'm not finding a basic VM property that contains this information. I see there's a "parent" property, so I'm not sure if that's what I need to use or not. A code snippet below is basically what I'd like to do:&lt;br /&gt;
&lt;br /&gt;
IList&amp;lt;EntityViewBase&amp;gt; vmList = client.FindEntityViews(typeof(VirtualMachine), null, null, null);&lt;br /&gt;
&lt;br /&gt;
foreach (VirtualMachine vm in vmList)&lt;br /&gt;
{&lt;br /&gt;
        Console.WriteLine(vm.Name);&lt;br /&gt;
        Console.WirteLine(vm.??)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Any help is greatly appreciated. Thanks!</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">c#</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">cluster</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">cluster_name</category>
      <pubDate>Fri, 13 Nov 2009 18:26:04 GMT</pubDate>
      <author>crigano</author>
      <guid>http://communities.vmware.com/thread/242404</guid>
      <dc:date>2009-11-13T18:26:04Z</dc:date>
      <clearspace:dateToText>3 days, 21 minutes ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>Create alarm "Lost Network Redundancy" by script?</title>
      <link>http://communities.vmware.com/thread/242874</link>
      <description>Hello:&lt;br /&gt;
&lt;br /&gt;
I am trying to write a script that will create alarm to monitor Lost Network Redundancy (I know manually it’s) on host.&lt;br /&gt;
&lt;br /&gt;
I know how to create alarm for “basic” event see attachment (LucD – thank you for your help) and know that for “Lost Network Redundancy” alarm I have to use “vprob.net.redundancy.lost” instead of “EnteringMaintenanceModeEvent” (like in my example); but I still have trouble to combine it together…&lt;br /&gt;
&lt;br /&gt;
Can someone please help me?&lt;br /&gt;
&lt;br /&gt;
Thank you,&lt;br /&gt;
qwert</description>
      <pubDate>Tue, 17 Nov 2009 16:04:39 GMT</pubDate>
      <author>qwert1235</author>
      <guid>http://communities.vmware.com/thread/242874</guid>
      <dc:date>2009-11-17T16:04:39Z</dc:date>
      <clearspace:dateToText>3 days, 10 hours ago</clearspace:dateToText>
      <clearspace:messageCount>7</clearspace:messageCount>
      <clearspace:replyCount>6</clearspace:replyCount>
    </item>
    <item>
      <title>Get-stat counter not available</title>
      <link>http://communities.vmware.com/thread/240453</link>
      <description>I'm trying to run following line&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Get-vm TestVM | get-stat -stat mem.swapused.kilobytes&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
but get error&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Get-Stat : 03/11/2009 16:10:49    Get-Stat        The metric counter "mem.swapused.kilobytes" doesn't exist for entity "TestVM".&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;At line:1 char:9&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;+ Get-stat &amp;lt;&amp;lt;&amp;lt;&amp;lt;  -entity (get-vm svr-sccm-cdc01) -stat mem.swapused.kilobytes -IntervalMins 5&lt;/b&gt;&lt;br /&gt;
    &lt;b&gt;+ CategoryInfo          : ResourceUnavailable: (:) &lt;a class="jive-link-adddocument" href="http://communities.vmware.com/community-document-picker.jspa?communityID=&amp;subject=Get-Stat"&gt;Get-Stat&lt;/a&gt;, VimException&lt;/b&gt;&lt;br /&gt;
    &lt;b&gt;+ FullyQualifiedErrorId : Client20_RuntimeDataServiceImpl_CheckUserMetrics_MetricDoesntExist,VMware.VimAutomation.Commands.GetViStats&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
the stats level in VC is 2 and I can see this stats through VI client.  Also if i run Get-TKEperformanceCounter form the Community Extensions this stat is listed for the VM.&lt;br /&gt;
&lt;br /&gt;
I can see level 1 type stats like &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;get-vm testvm | get-stat -stat mem.usage.average&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I'm running PowerCli 4 162509&lt;br /&gt;
&lt;br /&gt;
thanks.</description>
      <pubDate>Tue, 03 Nov 2009 16:26:53 GMT</pubDate>
      <author>houghtp</author>
      <guid>http://communities.vmware.com/thread/240453</guid>
      <dc:date>2009-11-03T16:26:53Z</dc:date>
      <clearspace:dateToText>3 days, 16 hours ago</clearspace:dateToText>
      <clearspace:messageCount>8</clearspace:messageCount>
      <clearspace:replyCount>7</clearspace:replyCount>
    </item>
    <item>
      <title>Get-Stat script help</title>
      <link>http://communities.vmware.com/thread/200720</link>
      <description>Hi &lt;br /&gt;
&lt;br /&gt;
I'm running the following script which used to work, but since i've upgraded to the latest version of the toolkit 1.5 142961 i get the following error:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Get-Stat : 20/03/2009 13:54:58    Get-Stat        The metric counter "clusterservices.cpufairness.latest" doesn't exist for entity "svr-vm&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;At C:\scripts\Host-Stats.ps1:55 char:20&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;+         $Stats = Get-Stat &amp;lt;&amp;lt;&amp;lt;&amp;lt;  -Entity $ESX -Start $Start -Finish $Finish -stat $Stat -IntervalSecs 300 -MaxSamples 1000&lt;/b&gt;&lt;br /&gt;
    &lt;b&gt;+ CategoryInfo          : ResourceUnavailable: (:) &lt;a class="jive-link-adddocument" href="http://communities.vmware.com/community-document-picker.jspa?communityID=&amp;subject=Get-Stat"&gt;Get-Stat&lt;/a&gt;, VimException&lt;/b&gt;&lt;br /&gt;
    &lt;b&gt;+ FullyQualifiedErrorId : Client20_RuntimeDataServiceImpl_CheckUserMetrics_MetricDoesntExist,VMware.VimAutomation.Commands.GetViStats&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Strange thing is the script does actually run and collect data but just throws the error.  the first time it tries to collect a data point from a host and only then.  I think I was running a previous version of 1.5 toolkit before I upgraded don't know what build though.  Here's my script..&lt;br /&gt;
&lt;br /&gt;
(Following Function copied from LUCD's get-stat.ps1 script)&lt;br /&gt;
&lt;br /&gt;
Function QueryPerf($entity)&lt;br /&gt;
{&lt;br /&gt;
	$perfMgr = Get-View (Get-View ServiceInstance).content.perfManager&lt;br /&gt;
&lt;p /&gt;
	# Create performance counter hashtable&lt;br /&gt;
	$pcTable = New-Object Hashtable&lt;br /&gt;
	$keyTable = New-Object Hashtable&lt;br /&gt;
	foreach($pC in $perfMgr.PerfCounter){&lt;br /&gt;
		if($pC.Level -ne 99){&lt;br /&gt;
			$pctable.Add(($pC.GroupInfo.Key + "." + $pC.NameInfo.Key + "." + $pC.RollupType),$pC.Key)&lt;br /&gt;
			$keyTable.Add($pC.Key, $pC)&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;p /&gt;
	$metrics = $perfMgr.QueryAvailablePerfMetric($entity.MoRef,$null,$null,$numinterval)&lt;br /&gt;
	$metricslist = @()&lt;br /&gt;
	foreach($pmId in $metrics){&lt;br /&gt;
		$row = "" | select Group, Name, Rollup&lt;br /&gt;
		$pC = $keyTable&lt;a class="jive-link-external" href="http://$pmId.CounterId"&gt;http://$pmId.CounterId&lt;/a&gt;&lt;br /&gt;
		$row.Group = $pC.GroupInfo.Key&lt;br /&gt;
		$row.Name = $pC.NameInfo.Key&lt;br /&gt;
		$row.Rollup = $pC.RollupType&lt;br /&gt;
		$metricslist += $row&lt;br /&gt;
	}&lt;br /&gt;
	return ($metricslist | Sort-Object -unique -property Group,Name,Rollup)&lt;br /&gt;
}&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
Connect-VIServer svr-vmc-crs01&lt;br /&gt;
&lt;br /&gt;
$entity = get-view -id (Get-VMHost svr-vmh-crcla01.lbcamden.net).id&lt;br /&gt;
$arrPerfcounters = QueryPerf($entity)&lt;br /&gt;
&lt;br /&gt;
$xl = New-Object -comobject Excel.Application&lt;br /&gt;
$xl.Visible = $true&lt;br /&gt;
$xl.sheetsInNewWorkbook = $arrPerfcounters.length&lt;br /&gt;
$wb = $xl.Workbooks.add()&lt;br /&gt;
&lt;br /&gt;
$Start = (Get-Date).adddays(-1)&lt;br /&gt;
$Finish = (Get-Date)&lt;br /&gt;
&lt;br /&gt;
$PerfCounterWorkSheet = 1	&lt;br /&gt;
&lt;br /&gt;
Foreach ($PC in $arrPerfCounters){&lt;br /&gt;
	$ws = $wb.Worksheets.Item($PerfCounterWorkSheet)&lt;br /&gt;
	$ws.name = $PC.Group + "." + $PC.Name&lt;br /&gt;
	$HostCount = 1&lt;br /&gt;
	$AllESXHosts = Get-cluster &lt;b&gt;cressy&lt;/b&gt; | Get-VMHost&lt;br /&gt;
&lt;p /&gt;
	foreach ($ESX in $AllESXHosts){&lt;br /&gt;
		$StatCount = 2&lt;br /&gt;
		$ws.Cells.Item(1,$HostCount+1) = "$ESX"&lt;br /&gt;
		$stat = $PC.Group + "." + $PC.Name + "." + $PC.Rollup&lt;br /&gt;
		$Stats = Get-Stat -Entity $ESX -Start $Start -Finish $Finish -stat $Stat -IntervalSecs 300 -MaxSamples 1000&lt;br /&gt;
		foreach ($stat in $stats){&lt;br /&gt;
			$ws.cells.item($statCount,1) = $stat.timestamp&lt;br /&gt;
			$ws.Cells.Item($StatCount,$HostCount+1) = $stat.Value&lt;br /&gt;
			$StatCount++&lt;br /&gt;
		}&lt;br /&gt;
		$HostCount++&lt;br /&gt;
	}&lt;br /&gt;
	$PerfCounterWorkSheet++&lt;br /&gt;
&lt;p /&gt;
}</description>
      <pubDate>Fri, 20 Mar 2009 15:41:55 GMT</pubDate>
      <author>houghtp</author>
      <guid>http://communities.vmware.com/thread/200720</guid>
      <dc:date>2009-03-20T15:41:55Z</dc:date>
      <clearspace:dateToText>3 days, 16 hours ago</clearspace:dateToText>
      <clearspace:messageCount>12</clearspace:messageCount>
      <clearspace:replyCount>11</clearspace:replyCount>
    </item>
    <item>
      <title>set-oscustomizationspec and IP address</title>
      <link>http://communities.vmware.com/thread/129894</link>
      <description>&lt;br /&gt;
In the set-oscustomizationspec cmdlet there don't seem to be options to customize network related parameters (for example the IP address).&lt;br /&gt;
&lt;p /&gt;
In the "Customization Specification Manager" in the VI Client these customization parameters can be configured.&lt;br /&gt;
&lt;p /&gt;
Is this correct ? Or are we missing something ?&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;</description>
      <pubDate>Mon, 03 Mar 2008 14:12:47 GMT</pubDate>
      <author>LucD</author>
      <guid>http://communities.vmware.com/thread/129894</guid>
      <dc:date>2008-03-03T14:12:47Z</dc:date>
      <clearspace:dateToText>3 days, 16 hours ago</clearspace:dateToText>
      <clearspace:messageCount>18</clearspace:messageCount>
      <clearspace:replyCount>17</clearspace:replyCount>
    </item>
    <item>
      <title>logic in powershell script</title>
      <link>http://communities.vmware.com/thread/220886</link>
      <description>&lt;br /&gt;
I use the clone_vm sdk way to deploy vm's.&lt;br /&gt;
&lt;p /&gt;
Thanks to luc sample code, i have a way of checken the clone task, so i can log when there is an error:&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
   #CHECK THE TASK&lt;br /&gt;
   while ($task.info.state -eq "running" -or $task.info.state -eq "queued")&lt;br /&gt;
     {&lt;br /&gt;
     sleep 2&lt;br /&gt;
     $task = Get-View $taskMoref&lt;br /&gt;
     }&lt;br /&gt;
&lt;p /&gt;
But now i am facing a problem, i wan't to clone 2 vm's at once. So i can speed up deployment. I created a counter to do that, but the while statement waits until it's loop has finished.&lt;br /&gt;
&lt;p /&gt;
Is there a way to keep the while statement and have 2 clone jobs?</description>
      <pubDate>Tue, 14 Jul 2009 06:28:55 GMT</pubDate>
      <author>RobMokkink</author>
      <guid>http://communities.vmware.com/thread/220886</guid>
      <dc:date>2009-07-14T06:28:55Z</dc:date>
      <clearspace:dateToText>3 days, 17 hours ago</clearspace:dateToText>
      <clearspace:messageCount>19</clearspace:messageCount>
      <clearspace:replyCount>18</clearspace:replyCount>
    </item>
    <item>
      <title>related bugs in set-vmhostnetwork and set-vmhostnetworkadapter</title>
      <link>http://communities.vmware.com/thread/166294</link>
      <description>The Set-VMHostNetwork cmdlet has a param called DnsDhcpDevice and accordin to the help file, it should accept "a ServiceConsoleNIC object, a VMKernelNIC object in case of ESX Visor, or the NIC name as a string".&lt;br /&gt;
&lt;br /&gt;
The Set-VMHostNetworkAdapter cmdlet has a param called PhysicalNic which the help says should take a "PhysicalNic[]".&lt;br /&gt;
&lt;br /&gt;
In the case of both of these parameters above, no cmdlet exists which can produce an object of the required types. The Get-VMHostNetwork cmdlet has PhysicalNic and VirtualNic properties which ideally, should do the trick but the type validation does not match and you get an error if you try it.&lt;br /&gt;
&lt;br /&gt;
To be consistent, there really should be a Get-VMHostNetworkAdapter cmdlet which can return the correct objects, and the code should be changed on one side (the VMHostNetworkInfoImpl object) or the other (the set-cmdlets) to match whatever object type you guys choose.&lt;br /&gt;
&lt;br /&gt;
In addition, I could not get a string to work for DnsDhcpDevice.&lt;br /&gt;
&lt;br /&gt;
And also, for the Set-VMHostNetworkAdapter cmdlet VirtualNic parameter, I was actually able to make this one work by using (get-vmhostnetwork).virtualnic, but that obviously is not ideal.&lt;br /&gt;
&lt;br /&gt;
I think all of these parameters should accept device names as well, e.g. vmnic0.&lt;br /&gt;
&lt;br /&gt;
And last but not least, is there a workaround for the pnic stuff? I may eventually be able to get this to work but I don't have the time to mess with it at the moment.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;PS &amp;gt; $pnic = New-Object vmware.VimAutomation.Types.Host.NIC.PhysicalNic
New-Object : Constructor not found. Cannot find an appropriate constructor for type v
mware.VimAutomation.Types.Host.NIC.PhysicalNic.
At line:1 char:19
+ $pnic = New-Object  &amp;lt;&amp;lt;&amp;lt;&amp;lt; vmware.VimAutomation.Types.Host.NIC.PhysicalNic
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;p /&gt;
&amp;lt;br&amp;gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Author of the upcoming book: &lt;a class="jive-link-external" href="http://sapienpress.com/vmware.asp"&gt;Managing VMware Infrastructure with PowerShell&lt;/a&gt;&lt;br /&gt;
Co-Host, PowerScripting Podcast (&lt;a class="jive-link-external" href="http://powerscripting.net"&gt;http://powerscripting.net&lt;/a&gt;)</description>
      <pubDate>Mon, 01 Sep 2008 21:53:36 GMT</pubDate>
      <author>halr9000</author>
      <guid>http://communities.vmware.com/thread/166294</guid>
      <dc:date>2008-09-01T21:53:36Z</dc:date>
      <clearspace:dateToText>3 days, 17 hours ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>Datastore and Controller Report</title>
      <link>http://communities.vmware.com/thread/207992</link>
      <description>&lt;br /&gt;
I'm having a major brain cramp. I've used two scripts I found in this forum. One is a report and another is a listing. I'd like to get the info from both scripts into 1 report. &lt;br /&gt;
&lt;p /&gt;
The first script is the report with the Datastore info:&lt;br /&gt;
&lt;p /&gt;
&lt;ol&gt;
&lt;li&gt;Get the VMs&lt;/li&gt;
&lt;/ol&gt;
$vm = get-datacenter "DATASTORE" | get-vm &lt;br /&gt;
$dsRegEx = &lt;a class="jive-link-adddocument" href="http://communities.vmware.com/community-document-picker.jspa?communityID=&amp;subject=regex"&gt;regex&lt;/a&gt;"[(\w+)]"&lt;br /&gt;
$report = @()&lt;br /&gt;
get-vm | % {&lt;br /&gt;
 $vm = $_&lt;br /&gt;
    $vm.HardDisks | %{&lt;br /&gt;
  $row = "" | Select Name,MemoryMB,NumCPU,Datastore,"Total Disk (Gb)"&lt;br /&gt;
  $row.Name = $vm.Name&lt;br /&gt;
  $row.MemoryMb = $vm.MemoryMb&lt;br /&gt;
  $row.NumCpu = $vm.NumCpu&lt;br /&gt;
  $row.Datastore = $dsRegEx.Match($_.Filename).Groups[1].Value&lt;br /&gt;
  $row.{Total Disk (Gb)} = "{0:N}" -f ($_.CapacityKB / 1Mb)&lt;br /&gt;
  $report += $row&lt;br /&gt;
 } &lt;br /&gt;
}&lt;br /&gt;
$report | sort -property Name, datastore,"Total Disk" |Export-Csv "C:\temp\chargeback.csv" -noTypeInformation&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;I'd like to get the Controller Type of the following script into the above report.&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
 # Get the VMs&lt;br /&gt;
$vm = get-datacenter "DATASTORE" | get-vm&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;For each of the VMs&lt;/li&gt;
&lt;/ol&gt;
$vm | % {&lt;br /&gt;
    $vmview = get-view $_.id&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Get all of the SCSI controller devices&lt;/li&gt;
&lt;/ol&gt;
    $hardware = $vmview.config.hardware&lt;br /&gt;
    $devices = $hardware | % {$_.device}&lt;br /&gt;
    $deviceinfo = $devices | % {$_.deviceinfo}&lt;br /&gt;
    $controller = $deviceinfo | ? {$_.label -like "SCSI Contro*"}&lt;br /&gt;
    $controller | select-object @{name="Name"; expression={$vmview.name}}, @{name="Controller"; expression={$_.label}}, @{name="Controller Type"; expression={$_.summary}}&lt;br /&gt;
}&lt;br /&gt;
&lt;p /&gt;
Thank you for your help. I just can't figure it out.&lt;br /&gt;
&lt;p /&gt;
 Cabby</description>
      <pubDate>Fri, 01 May 2009 21:45:29 GMT</pubDate>
      <author>Cabby</author>
      <guid>http://communities.vmware.com/thread/207992</guid>
      <dc:date>2009-05-01T21:45:29Z</dc:date>
      <clearspace:dateToText>4 days, 6 hours ago</clearspace:dateToText>
      <clearspace:messageCount>10</clearspace:messageCount>
      <clearspace:replyCount>9</clearspace:replyCount>
    </item>
    <item>
      <title>Tasks Status ...</title>
      <link>http://communities.vmware.com/thread/243055</link>
      <description>Hello,&lt;br /&gt;
&lt;br /&gt;
I would like to have the status of the tasks of virtual machines to be able to know when they are completely stopped. &lt;br /&gt;
After the stop of virtual machines, I'd like to start replication datastore. For this reason I must be sure that all machines are stopped.&lt;br /&gt;
&lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;br /&gt;
Lucien.</description>
      <pubDate>Wed, 18 Nov 2009 12:19:53 GMT</pubDate>
      <author>vZedification</author>
      <guid>http://communities.vmware.com/thread/243055</guid>
      <dc:date>2009-11-18T12:19:53Z</dc:date>
      <clearspace:dateToText>4 days, 9 hours ago</clearspace:dateToText>
      <clearspace:messageCount>6</clearspace:messageCount>
      <clearspace:replyCount>5</clearspace:replyCount>
    </item>
    <item>
      <title>Get a VM's IP address? (when DNS not available)</title>
      <link>http://communities.vmware.com/thread/243294</link>
      <description>I have a odd setup where I have a vCenter server running in a private network that doesn't have INTERNAL DNS available.  I'm currently running scripts that query an IP range but takes forever to run.  I can run get-vm and get all the VMs but can't do anything with them since there is no DNS and I can't find a way to grab a VM's IP address.  If I could get IP addresses I could then run functions against them.  If it makes a difference these VM's have two nics: Public and Private.  Any ideas?</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vsphere_powercli</category>
      <pubDate>Thu, 19 Nov 2009 15:29:23 GMT</pubDate>
      <author>EvilEmuofDoom</author>
      <guid>http://communities.vmware.com/thread/243294</guid>
      <dc:date>2009-11-19T15:29:23Z</dc:date>
      <clearspace:dateToText>4 days, 9 hours ago</clearspace:dateToText>
      <clearspace:messageCount>6</clearspace:messageCount>
      <clearspace:replyCount>5</clearspace:replyCount>
    </item>
    <item>
      <title>find slider bar setting in DRS fully automated mode on cluster</title>
      <link>http://communities.vmware.com/thread/243282</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
Anyone know what the parameter is for knowing where your slider bar is for DRS Automation Level, the below returns that it is set for FullyAutomated but I would like to know what recommendations it will apply, (2, 3, 4 stars...) or just where the slider bar is.&lt;br /&gt;
&lt;br /&gt;
$cluster = get-cluster Main&lt;br /&gt;
$cluster.DRSAutomationLevel&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
&lt;br /&gt;
Dan</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">cluster</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">report</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">script</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">toolkit</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vitoolkit</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vi_toolkit_windows</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">drs</category>
      <pubDate>Thu, 19 Nov 2009 14:21:16 GMT</pubDate>
      <author>a2alpha</author>
      <guid>http://communities.vmware.com/thread/243282</guid>
      <dc:date>2009-11-19T14:21:16Z</dc:date>
      <clearspace:dateToText>4 days, 9 hours ago</clearspace:dateToText>
      <clearspace:messageCount>4</clearspace:messageCount>
      <clearspace:replyCount>3</clearspace:replyCount>
    </item>
    <item>
      <title>Enable Mount and resignature of  snap luns on vSphere</title>
      <link>http://communities.vmware.com/thread/229925</link>
      <description>Hi all, &lt;br /&gt;
&lt;br /&gt;
I've done some PS development work in the past (with all your assistance) to get my VI3.5 system to mount snaps from my NAS device and allow me to review the contents. &lt;br /&gt;
In the past (with VI3.5) all I had to do was use the powershell to change the LVM option value of the Esx host to "AllowSnapLun" and "EnableResignature" then rescan the esx storage. The LUN would appear (with a SNAP-xxx_lun name) &lt;br /&gt;
Great - all was well with the world. &lt;br /&gt;
&lt;br /&gt;
Then we updated to vSphere and this has now put a spanner in the works. &lt;br /&gt;
&lt;br /&gt;
Seems that vSphere no longer has the LVM option values to allow for the mounting of the LUN's. In theory, this is because vShpere allows you to mount snapped LUNs. However - the LUN appears but the datastore is invisible?? I can't find any way of allowing the powershell to mount the snapped datastores. &lt;br /&gt;
&lt;br /&gt;
There seems to be some esx host Service console ESXCFG code for resiging a lun, but I can't launch that from the powershell can I, and if I could - it asks for a UUID for the storage? - how would I know what this is without manually looking each time? (not great for scripting). &lt;br /&gt;
&lt;br /&gt;
Any ideas how I do this??&lt;br /&gt;
&lt;p /&gt;
Also note  - I'm still using the VItoolkit (NOT the NEW PowerCLI) as the PowerCLI breaks some of the code I used for mounting VMDK files on VM's. I anyone can confirm that the powerCLI is required and perhaps provide some code to prove the pointt - thats also worth a look, but I do not have time for a re-write at the mo so have shied away from the upgrade. &lt;br /&gt;
&lt;p /&gt;
Any help would be much appreciated. &lt;br /&gt;
&lt;br /&gt;
TG</description>
      <pubDate>Fri, 04 Sep 2009 14:00:37 GMT</pubDate>
      <author>tonygent</author>
      <guid>http://communities.vmware.com/thread/229925</guid>
      <dc:date>2009-09-04T14:00:37Z</dc:date>
      <clearspace:dateToText>4 days, 9 hours ago</clearspace:dateToText>
      <clearspace:messageCount>19</clearspace:messageCount>
      <clearspace:replyCount>18</clearspace:replyCount>
    </item>
    <item>
      <title>Need to report VM path and Full path of .vmx file using friendly LUN ID</title>
      <link>http://communities.vmware.com/thread/242904</link>
      <description>Hi&lt;br /&gt;
&lt;br /&gt;
Came accross Luc's script to list vm path and datastore:&lt;br /&gt;
&lt;br /&gt;
Get-VM | Get-View | %{&lt;br /&gt;
  $row = "" | select Name, Datastore, Path&lt;br /&gt;
  $row.Name = $_.Name&lt;br /&gt;
  $row.Datastore = (Get-View $_.Datastore[0]).Summary.Name&lt;br /&gt;
  $current = Get-View $_.Parent&lt;br /&gt;
  $path = $_.Name&lt;br /&gt;
  do {&lt;br /&gt;
    $parent = $current&lt;br /&gt;
	if($parent.Name -ne "vm"){$path =  $parent.Name + "\" + $path}&lt;br /&gt;
	$current = Get-View $current.Parent&lt;br /&gt;
  } while ($current.Parent -ne $null)&lt;br /&gt;
  $row.Path = $path&lt;br /&gt;
  $report += $row&lt;br /&gt;
}&lt;br /&gt;
$report | Export-Csv $CsvFile -NoTypeInformation&lt;br /&gt;
&lt;br /&gt;
I need help modifying this script to list the full path of the vmx file&lt;br /&gt;
&lt;br /&gt;
Thanks</description>
      <pubDate>Tue, 17 Nov 2009 17:54:13 GMT</pubDate>
      <author>AGFlora</author>
      <guid>http://communities.vmware.com/thread/242904</guid>
      <dc:date>2009-11-17T17:54:13Z</dc:date>
      <clearspace:dateToText>4 days, 15 hours ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Copying VM or Templates from one datastore to another</title>
      <link>http://communities.vmware.com/thread/243259</link>
      <description>Hi all,&lt;br /&gt;
&lt;br /&gt;
I need to be able to check for the existance of a particular VM Template on a datastore and then if it is are not there, transfer a copy of it from a secure datastore.&lt;br /&gt;
&lt;br /&gt;
I started out with just trying to copy the entire content of a datastore  from one to another, but have now coded myself into a corner.  As my programming skills are limited I am probably missing something very simple.&lt;br /&gt;
&lt;br /&gt;
Any help would be as always much appreciated.  I have attached the script I have so far.&lt;br /&gt;
&lt;br /&gt;
#Add VMware Powershell Cmdlets&lt;br /&gt;
Add-PSSnapin -Name Vmware.VimAutomation.Core&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Connect to Infrastructure vCenter&lt;/li&gt;
&lt;/ol&gt;
Connect-VIServer -Server vc-overview.qavdc.com -User administrator -Password vmware&lt;br /&gt;
Write-Host “Connected to VirtualCenter ($vc)”&lt;br /&gt;
&lt;br /&gt;
function CopyDirectory( $dc, $source, $dest ) {&lt;br /&gt;
	$vmhost = Get-VMHost | Get-View&lt;br /&gt;
	$browser = Get-View $vmhost[0].DatastoreBrowser&lt;br /&gt;
&lt;p /&gt;
	$spec = New-Object VMware.Vim.HostDatastoreBrowserSearchSpec&lt;br /&gt;
	$spec.MatchPattern = "*"&lt;br /&gt;
	$spec.Details.fileType = $true&lt;br /&gt;
&lt;p /&gt;
	$srcf = $browser.SearchDatastore( $source, $spec )&lt;br /&gt;
	foreach( $srcfile in $srcf ) {&lt;br /&gt;
		Write-Output $srcfile&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$dc = Get-Datacenter "Training"&lt;br /&gt;
&lt;br /&gt;
CopyDirectory( $dc, '&lt;a class="jive-link-adddocument" href="http://communities.vmware.com/community-document-picker.jspa?communityID=&amp;subject=SharedTMPLs"&gt;SharedTMPLs&lt;/a&gt;', '&lt;a class="jive-link-adddocument" href="http://communities.vmware.com/community-document-picker.jspa?communityID=&amp;subject=SharedVMs"&gt;SharedVMs&lt;/a&gt;' )&lt;br /&gt;
&lt;br /&gt;
When I run this code I get the following error.&lt;br /&gt;
&lt;br /&gt;
Property 'fileType' cannot be found on this object; make sure it exists and is settable.&lt;br /&gt;
At :line:14 char:15&lt;br /&gt;
+ 	$spec.Details. &amp;lt;&amp;lt;&amp;lt;&amp;lt; fileType = $true</description>
      <pubDate>Thu, 19 Nov 2009 09:27:35 GMT</pubDate>
      <author>alasdair.carnie</author>
      <guid>http://communities.vmware.com/thread/243259</guid>
      <dc:date>2009-11-19T09:27:35Z</dc:date>
      <clearspace:dateToText>4 days, 16 hours ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>VM disk usage and datastore report</title>
      <link>http://communities.vmware.com/thread/242937</link>
      <description>I am trying to figure out the best method to get the following:&lt;br /&gt;
&lt;br /&gt;
Name of VM&lt;br /&gt;
Size of D: Drive (both preallocated and actually used)&lt;br /&gt;
cluster or resource pool the VM belongs to &lt;br /&gt;
Datastore where VM resides. &lt;br /&gt;
&lt;br /&gt;
I have been messing with various storage reports that give me VM to datastore mapping, but I need something that will look at the used space within the VM and report that as well. This is all to go into an excel spreadsheet to begin a capacity planning presentation. &lt;br /&gt;
&lt;br /&gt;
HELP! &lt;img class="jive-emoticon" border="0" src="http://communities.vmware.com/images/emoticons/happy.gif" alt=":)" /&gt;</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">storage_report</category>
      <pubDate>Tue, 17 Nov 2009 19:18:38 GMT</pubDate>
      <author>kwharrisit</author>
      <guid>http://communities.vmware.com/thread/242937</guid>
      <dc:date>2009-11-17T19:18:38Z</dc:date>
      <clearspace:dateToText>4 days, 21 hours ago</clearspace:dateToText>
      <clearspace:messageCount>4</clearspace:messageCount>
      <clearspace:replyCount>3</clearspace:replyCount>
    </item>
    <item>
      <title>SearchDatastoreSubFolders + GetVersion Question</title>
      <link>http://communities.vmware.com/thread/242991</link>
      <description>&lt;br /&gt;
Hi guys,&lt;br /&gt;
&lt;p /&gt;
 I'm relatively new to PowerCLI and VMWare and general, and have been trying to run some example scripts. I am using PowerGUI as my editor and debugger. The problem lies in the function  HostDatastoreBrowserSearchSpec; i've tried some things, but it keeps coming up with the following error:&lt;br /&gt;
&lt;p /&gt;
&lt;i&gt;Exception calling "SearchDatastoreSubFolders" with "2" argument(s): "Not initialized: boolean fileOwner"&lt;/i&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
I am running VSphere 4 and am not entirely sure what version of Powershell I've been running.&lt;br /&gt;
&lt;p /&gt;
I think I updated Powershell to the most recent XP / Vista (two separate boxes) version (XP its the version bundled /w Windows Management Framework Core. For Vista, the KB968930 update), but whenever I debug in PowerGUI it shows that it is executing Powershell from c:\windows\system32\WindowsPowershell\v1.0\powershell.exe.&lt;br /&gt;
&lt;p /&gt;
Is there any way I can check my powershell version, and if I am still doing the right thing, how do I fix the error? I cannot seem to find any resources online with a working answer; I set the fileowner attribute to true and tried multiple versions of Powershell which is what the internet suggested, and now I'm out of ideas.</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">searchdatastoresubfolders</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">get_version</category>
      <pubDate>Wed, 18 Nov 2009 00:37:03 GMT</pubDate>
      <author>Sirry</author>
      <guid>http://communities.vmware.com/thread/242991</guid>
      <dc:date>2009-11-18T00:37:03Z</dc:date>
      <clearspace:dateToText>5 days, 8 hours ago</clearspace:dateToText>
      <clearspace:messageCount>4</clearspace:messageCount>
      <clearspace:replyCount>3</clearspace:replyCount>
    </item>
    <item>
      <title>background jobs with VMware.VimAutomation.Core</title>
      <link>http://communities.vmware.com/thread/238070</link>
      <description>&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;p /&gt;
 I am using the new winrm 2.0 on Windows XP and trying to run a background job. The command I am using is:&lt;br /&gt;
&lt;p /&gt;
start-job -InitializationScript{add-pssnapin VMware.VimAutomation.Core} -ScriptBlock{connect-viserver myserver}&lt;br /&gt;
&lt;p /&gt;
 The job progres is set to running and no matter how long I wait, it does not change.  I further tried with other scriptblocks and seems that as long as I try to load the vmware snapin, the job just stays on running.&lt;br /&gt;
&lt;p /&gt;
 Has anyone had better luck with this?&lt;br /&gt;
&lt;p /&gt;
I am running VMware-Vim4PS-4.0.0-162509.exe.&lt;br /&gt;
&lt;p /&gt;
 Thanks,&lt;br /&gt;
&lt;p /&gt;
Oren.</description>
      <pubDate>Thu, 22 Oct 2009 07:49:16 GMT</pubDate>
      <author>orend</author>
      <guid>http://communities.vmware.com/thread/238070</guid>
      <dc:date>2009-10-22T07:49:16Z</dc:date>
      <clearspace:dateToText>5 days, 10 hours ago</clearspace:dateToText>
      <clearspace:messageCount>7</clearspace:messageCount>
      <clearspace:replyCount>6</clearspace:replyCount>
    </item>
    <item>
      <title>Help with vswitch active/standby vmnic configuration</title>
      <link>http://communities.vmware.com/thread/242728</link>
      <description>&lt;br /&gt;
hello,&lt;br /&gt;
&lt;p /&gt;
I'm in the process of scripting post config of esx4i hosts.  we use vswitch2 for nfs traffic and need to set one of the nics as active and one as standby.  here is my script where i counfigure and set the switch:&lt;br /&gt;
&lt;p /&gt;
New-VirtualSwitch -VMHost $vmhost -Name vSwitch2&lt;br /&gt;
$nfsvs = Get-VirtualSwitch -VMHost $vmhost -Name "vSwitch2"&lt;br /&gt;
New-VMHostNetworkAdapter&lt;br /&gt;
-VMHost $vmhost -PortGroup $NFSport -VirtualSwitch $nfsvs -IP $nfsip&lt;br /&gt;
-SubnetMask 255.255.255.0 -VMotionEnabled $false -EA Stop&lt;br /&gt;
$nfsvs =  Get-VirtualSwitch -VMHost $vmHost -Name vSwitch2&lt;br /&gt;
Set-VirtualSwitch -VirtualSwitch $nfsvs -Nic $NFSnic1&lt;br /&gt;
Set-VirtualSwitch -VirtualSwitch $nfsvs -Nic $NFSnic2  &lt;br /&gt;
&lt;p /&gt;
This works great but after post config is done i have to manually change the standby &lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
  Problem is i can't figure out how to make $nfsnic1 active and $nfsnic2 standby in the script.&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Any help is appreciated.&lt;br /&gt;
&lt;p /&gt;
Alex &lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;</description>
      <pubDate>Mon, 16 Nov 2009 19:40:20 GMT</pubDate>
      <author>kalex</author>
      <guid>http://communities.vmware.com/thread/242728</guid>
      <dc:date>2009-11-16T19:40:20Z</dc:date>
      <clearspace:dateToText>5 days, 22 hours ago</clearspace:dateToText>
      <clearspace:messageCount>8</clearspace:messageCount>
      <clearspace:replyCount>7</clearspace:replyCount>
    </item>
    <item>
      <title>Stagger VM startups get-vm -Name server1 | start-vm</title>
      <link>http://communities.vmware.com/thread/233283</link>
      <description>&lt;br /&gt;
connect-viserver -server 192.168.1.1 -user root -password password&lt;br /&gt;
&lt;p /&gt;
get-vm -Name server1 | start-vm&lt;br /&gt;
get-vm -Name server2 | start-vm&lt;br /&gt;
get-vm -Name w2k     | start-vm&lt;br /&gt;
&lt;p /&gt;
I want to be able to stagger starts up? Whats the easy way to do this please? &lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;</description>
      <pubDate>Wed, 23 Sep 2009 21:55:37 GMT</pubDate>
      <author>teddyboy</author>
      <guid>http://communities.vmware.com/thread/233283</guid>
      <dc:date>2009-09-23T21:55:37Z</dc:date>
      <clearspace:dateToText>5 days, 23 hours ago</clearspace:dateToText>
      <clearspace:messageCount>6</clearspace:messageCount>
      <clearspace:replyCount>5</clearspace:replyCount>
    </item>
    <item>
      <title>Copy files (vmx) , how to script it ??</title>
      <link>http://communities.vmware.com/thread/207691</link>
      <description>&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Quite new in VI Toolkit / Powershell but for a SRM project I need to automate so stuff.&lt;br /&gt;
&lt;p /&gt;
Is there a way that a can take a copy from a vmx file and rename it. (Will be stored in the same folder / datastore but with different name) &lt;br /&gt;
&lt;p /&gt;
Assume can't be so difficult but it didn't get it work yet?&lt;br /&gt;
&lt;p /&gt;
Any idea, some scriptlets &lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Thanks&lt;br /&gt;
&lt;p /&gt;
Christof</description>
      <pubDate>Thu, 30 Apr 2009 09:21:13 GMT</pubDate>
      <author>ugauchr</author>
      <guid>http://communities.vmware.com/thread/207691</guid>
      <dc:date>2009-04-30T09:21:13Z</dc:date>
      <clearspace:dateToText>6 days, 13 hours ago</clearspace:dateToText>
      <clearspace:messageCount>9</clearspace:messageCount>
      <clearspace:replyCount>8</clearspace:replyCount>
    </item>
    <item>
      <title>All blue folders do not show in report</title>
      <link>http://communities.vmware.com/thread/241762</link>
      <description>Hi&lt;br /&gt;
&lt;br /&gt;
For some reason or another when I run a report against one of my datacenters 2 blue folders do not show up in the report that are listed under this datacenter.&lt;br /&gt;
&lt;br /&gt;
I'm attaching the code becasue this forum doesn't like brackets.&lt;br /&gt;
&lt;br /&gt;
Thanks</description>
      <pubDate>Tue, 10 Nov 2009 18:09:22 GMT</pubDate>
      <author>AGFlora</author>
      <guid>http://communities.vmware.com/thread/241762</guid>
      <dc:date>2009-11-10T18:09:22Z</dc:date>
      <clearspace:dateToText>1 week, 42 minutes ago</clearspace:dateToText>
      <clearspace:messageCount>9</clearspace:messageCount>
      <clearspace:replyCount>8</clearspace:replyCount>
    </item>
    <item>
      <title>Pro grammatically deploying a virtual machine to Data Center A from a template in Data Center B</title>
      <link>http://communities.vmware.com/thread/242681</link>
      <description>I've seen several discussions saying that it's not possible to deploy a virtual machine to a particular data center from a template that was stored in a separate data center - even though both data centers were managed by the same Virtual Center.  The error most often associated with this failure was "the input arguments had entities that did not belong to the same datacenter"&lt;br /&gt;
&lt;br /&gt;
However, we've been doing this exact thing for some time using Virtual Center 2.5 and ESX 3.5 hosts using the VI Client.  One data center (call it A) has our templates hosted on a SAN device.  We've got a number of ESX 3.5 hosts in a separate data center (call it B).  We routinely deploy from A to B using the VI Client.  And it doesn't have any errors.  It &lt;u&gt;does&lt;/u&gt; have some warnings when a deployment is made concerning the networks may not be the same.  We work around that by making sure that the networks under both data centers that have the same name are physically attached to the same network, so the warning can be safely ignored.&lt;br /&gt;
&lt;br /&gt;
The problem occurred when we tried to automate this process using the PowerCLI (actually, the .NET interface).  When we tried that for the first time, we encountered the "the input arguments had entities that did not belong to the same datacenter" error that everyone else sees.  So, how does the VI Client do it?  Both VI Client and the PowerCLI interface are using the same SDK at some level.  Is there some extra command, some extra parameter that needs to be performed to get this to work?</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">clone</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">data_center</category>
      <pubDate>Mon, 16 Nov 2009 17:11:18 GMT</pubDate>
      <author>jswager1</author>
      <guid>http://communities.vmware.com/thread/242681</guid>
      <dc:date>2009-11-16T17:11:18Z</dc:date>
      <clearspace:dateToText>1 week, 2 hours ago</clearspace:dateToText>
      <clearspace:messageCount>4</clearspace:messageCount>
      <clearspace:replyCount>3</clearspace:replyCount>
    </item>
    <item>
      <title>Set Default CPU Masking options</title>
      <link>http://communities.vmware.com/thread/234625</link>
      <description>&lt;br /&gt;
What is the best method of resetting all the CPU Masking options back to default via the PowerCLI?  I'm looking for the equivelent to choosing CPUID Mask &amp;gt; Advanced &amp;gt; Reset All to Default.  I am able to easily set CPU masks (as per a number of helpful posts in this community), however finding out how to Reset them has proven more difficult.&lt;br /&gt;
&lt;p /&gt;
 Doug</description>
      <pubDate>Thu, 01 Oct 2009 17:55:18 GMT</pubDate>
      <author>nicad449</author>
      <guid>http://communities.vmware.com/thread/234625</guid>
      <dc:date>2009-10-01T17:55:18Z</dc:date>
      <clearspace:dateToText>1 week, 3 hours ago</clearspace:dateToText>
      <clearspace:messageCount>6</clearspace:messageCount>
      <clearspace:replyCount>5</clearspace:replyCount>
    </item>
    <item>
      <title>Remove a vmnic from a VirtualSwitch</title>
      <link>http://communities.vmware.com/thread/242670</link>
      <description>&lt;br /&gt;
I can't seem to find a way to remove a vmnic from an existing VirtualSwitch...&lt;br /&gt;
&lt;p /&gt;
The set-virtualswitch "-nic" parameter seems to add nics to a virtualswitch, not necessary set them.&lt;br /&gt;
&lt;p /&gt;
For example, I have "vSwitch0" with 3 nics and "vSwitch1" with 3 nics.  I want to move one of the vSwitch1 nics to the vSwitch0 switch.  I can't seem to find a way to do this via PowerShell unless I delete and re-create vSwitch1.  (I am reconfiguring networking on a group of about 60 systems) &lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">set-virtualswitch</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">nic</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powercli</category>
      <pubDate>Mon, 16 Nov 2009 16:40:46 GMT</pubDate>
      <author>IMMatt</author>
      <guid>http://communities.vmware.com/thread/242670</guid>
      <dc:date>2009-11-16T16:40:46Z</dc:date>
      <clearspace:dateToText>1 week, 8 hours ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Unregistering VMs</title>
      <link>http://communities.vmware.com/thread/242628</link>
      <description>Hi all,&lt;br /&gt;
&lt;br /&gt;
I currently have a script for finding and registering VM Templates or VMs, but what I need to be able to do now is Unregister a list of VMs and then register a select number of them with my ESX Hosts.  Can anyone help me with some sample use of the UnregisterVM_Task.&lt;br /&gt;
&lt;br /&gt;
My current registration script has this in it&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Register Template with MGMT1&lt;/li&gt;
&lt;/ol&gt;
$templateHost = Get-VMHost $mgmt1 | Get-View&lt;br /&gt;
$folder = Get-View (Get-Datacenter -Name $datacenterName | Get-Folder -Name $templateFolder).ID&lt;br /&gt;
$vmtx = $templatePath + "/" + $templateName + ".vmtx"&lt;br /&gt;
$task = $folder.RegisterVM_Task($vmtx,$templateName,$true,$null,$templateHost.MoRef)&lt;br /&gt;
&lt;br /&gt;
I've tried changing the $task setting to unregister but I get an error that the method does not exist.&lt;br /&gt;
&lt;br /&gt;
Any help would be appreciated.&lt;br /&gt;
&lt;br /&gt;
Best Regards,&lt;br /&gt;
&lt;br /&gt;
Alasdair.......</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">unregistered</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">templates</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vcenter</category>
      <pubDate>Mon, 16 Nov 2009 12:30:07 GMT</pubDate>
      <author>alasdair.carnie</author>
      <guid>http://communities.vmware.com/thread/242628</guid>
      <dc:date>2009-11-16T12:30:07Z</dc:date>
      <clearspace:dateToText>1 week, 13 hours ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>reset sensors</title>
      <link>http://communities.vmware.com/thread/242602</link>
      <description>&lt;br /&gt;
After applying patches to esx 3.5 in our lab, the hardware sensors are stuck.&lt;br /&gt;
&lt;p /&gt;
I need to reset them, is there a way to do that with powershell?</description>
      <pubDate>Mon, 16 Nov 2009 08:00:08 GMT</pubDate>
      <author>RobMokkink</author>
      <guid>http://communities.vmware.com/thread/242602</guid>
      <dc:date>2009-11-16T08:00:08Z</dc:date>
      <clearspace:dateToText>1 week, 13 hours ago</clearspace:dateToText>
      <clearspace:messageCount>6</clearspace:messageCount>
      <clearspace:replyCount>5</clearspace:replyCount>
    </item>
    <item>
      <title>help with vmkernel route scripting</title>
      <link>http://communities.vmware.com/thread/242423</link>
      <description>&lt;br /&gt;
Hello,&lt;br /&gt;
&lt;p /&gt;
 I'm trying to replicate vicfg-route.pl functionality via New-TkeVMHostRoute VI toolkit extension.  Problem is i can't seem to figure out how to script it.  if i open a new powerCLI window and do the following manually it works:&lt;br /&gt;
&lt;p /&gt;
 Connect-VIServer hostname&lt;br /&gt;
&lt;p /&gt;
Get-VMHost hostname | New-TKeVMHostRoute -TableRoute -Network 10.10.10.0 -PrefixLength 24 -Gateway 10.10.10.1 &lt;br /&gt;
&lt;p /&gt;
That works perfectly but here is what i have in the script and this fails to run:&lt;br /&gt;
&lt;br /&gt;
$vmhost = "hostname"&lt;br /&gt;
&lt;p /&gt;
Connect-VIServer $vmhost&lt;br /&gt;
&lt;p /&gt;
Get-VMhost $vmhost | New-TKeVMHostROute -TableRoute -Network 10.10.10.0 -PrefixLength 24 -Gateway 10.10.10.1 &lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Any ideas of why script is failing to run but running it manually from  PowerCLI window works great&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
 Thanks&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Alex &lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;</description>
      <pubDate>Fri, 13 Nov 2009 21:57:59 GMT</pubDate>
      <author>kalex</author>
      <guid>http://communities.vmware.com/thread/242423</guid>
      <dc:date>2009-11-13T21:57:59Z</dc:date>
      <clearspace:dateToText>1 week, 1 day ago</clearspace:dateToText>
      <clearspace:messageCount>8</clearspace:messageCount>
      <clearspace:replyCount>7</clearspace:replyCount>
    </item>
    <item>
      <title>Set-NetworkAdapter</title>
      <link>http://communities.vmware.com/thread/242447</link>
      <description>Does anyone have a suggestion on a one-liner that would connect, and conversly disconnect, the network adapter for vm's matching a certain string?  That is to say, I want to disconnect all the vm's in my envoirmnet that start with DR_.  Any suggestions will be greatly appreciated.</description>
      <pubDate>Fri, 13 Nov 2009 20:22:23 GMT</pubDate>
      <author>neririn</author>
      <guid>http://communities.vmware.com/thread/242447</guid>
      <dc:date>2009-11-13T20:22:23Z</dc:date>
      <clearspace:dateToText>1 week, 3 days ago</clearspace:dateToText>
      <clearspace:messageCount>2</clearspace:messageCount>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>Test whether a variable has anything in it so a script can continue - if($var1 -gt 0)</title>
      <link>http://communities.vmware.com/thread/242358</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
I was wondering how you perform a test to see if a variable created from a previous command has got anything in it. My script keeps failing because it is comparing it to 0 with a if greater than.&lt;br /&gt;
&lt;br /&gt;
For example I have:&lt;br /&gt;
&lt;br /&gt;
$var = get-vm&lt;br /&gt;
&lt;br /&gt;
if i want to test whether there is anything in it how do I make the following test:&lt;br /&gt;
&lt;br /&gt;
If($var -gt 0)&lt;br /&gt;
{&lt;br /&gt;
$var&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
"nothing in variable"&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
It seems sometimes it works others it throws one of those red errors.&lt;br /&gt;
&lt;br /&gt;
Thanks in advance for any help,&lt;br /&gt;
&lt;br /&gt;
Dan</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vi_toolkit_windows</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vitoolkit</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vmware</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powershell</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powercli</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">automation</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">toolkit</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">script</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">get-vm</category>
      <pubDate>Fri, 13 Nov 2009 12:58:53 GMT</pubDate>
      <author>a2alpha</author>
      <guid>http://communities.vmware.com/thread/242358</guid>
      <dc:date>2009-11-13T12:58:53Z</dc:date>
      <clearspace:dateToText>1 week, 3 days ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>help enhancing existing script</title>
      <link>http://communities.vmware.com/thread/241166</link>
      <description>&lt;br /&gt;
So i initially tried getting this to loop through all the folders but couldn't figure it out so i made it so i could pass the folder as a parameter but ideally i want it to do all VMs without having to enter any parameters. Any ideas on how to best do this? I want to make csv files for each folder with all the custom attributes for each VM contained within. &lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
##Variables&lt;br /&gt;
Param($Param1)&lt;br /&gt;
$report = @()&lt;br /&gt;
$folders = get-folder $Param1 # | sort name&lt;br /&gt;
&lt;p /&gt;
############################################################################################&lt;br /&gt;
&lt;br /&gt;
###########################&lt;br /&gt;
&lt;p /&gt;
ForEach ($folder in $folders)&lt;br /&gt;
{&lt;br /&gt;
$vms = get-vm -location $folder&lt;br /&gt;
ForEach ($vm in $vms)&lt;br /&gt;
{&lt;br /&gt;
$ReportObj = "" | Select "Folder", "Virtual Machine", "POC", "Username", "Password", &lt;br /&gt;
&lt;br /&gt;
$ReportObj."Folder" = $folder.name&lt;br /&gt;
$ReportObj."Virtual Machine" = $vm.name&lt;br /&gt;
$ReportObj."POC" = $vm.CustomFields &lt;br /&gt;
$ReportObj."Username" = $vm.CustomFields &lt;br /&gt;
$ReportObj."Password" = $vm.CustomFields&lt;br /&gt;
$Report += $ReportObj&lt;br /&gt;
$csvfile = "D:\"&lt;i&gt;$folder&lt;/i&gt;".csv"&lt;br /&gt;
$report | Export-CSV $csvfile -NoTypeInformation &lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
}</description>
      <pubDate>Fri, 06 Nov 2009 17:09:54 GMT</pubDate>
      <author>rg01</author>
      <guid>http://communities.vmware.com/thread/241166</guid>
      <dc:date>2009-11-06T17:09:54Z</dc:date>
      <clearspace:dateToText>1 week, 4 days ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>Script Powershell to clone a VM</title>
      <link>http://communities.vmware.com/thread/238151</link>
      <description>&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;p /&gt;
 I would like to perform a clone of a VM with a script powershell. I can't find a way to do this easily. I wrote a script that clon a VM1 to template then template to VM2. Is there another method ?&lt;br /&gt;
&lt;p /&gt;
Thanks,&lt;br /&gt;
&lt;p /&gt;
NB : Tomorrow, I'll post my script (poor script :/ )</description>
      <pubDate>Thu, 22 Oct 2009 16:13:53 GMT</pubDate>
      <author>dcouturier</author>
      <guid>http://communities.vmware.com/thread/238151</guid>
      <dc:date>2009-10-22T16:13:53Z</dc:date>
      <clearspace:dateToText>1 week, 4 days ago</clearspace:dateToText>
      <clearspace:messageCount>8</clearspace:messageCount>
      <clearspace:replyCount>7</clearspace:replyCount>
    </item>
    <item>
      <title>Need a powershell Script to copy a RPM into ESX server and perform a -ivh</title>
      <link>http://communities.vmware.com/thread/241977</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
Iam looking out for a Powershell script for performing the following function,&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
I have one RPM file and other file and need to perform the below given function, &lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
1. Copy the file sys.RPM to ESX server 3.5 to \vmware\pack folder   (Currently the file is in the windows machine where powershell is installed)&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
2.Install the package on that ESX server by executing rpm -ivh&lt;br /&gt;
&lt;p /&gt;
3. Copy one more file sys.zvt to \etc\opt in that ESX server (This file is alsoon the windows machine where powershell is installed)&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
I need to perform this on multiple ESX servers so ESX server list should be given via input file.&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
Thanks in advance!</description>
      <pubDate>Wed, 11 Nov 2009 18:36:20 GMT</pubDate>
      <author>Sureshadmin</author>
      <guid>http://communities.vmware.com/thread/241977</guid>
      <dc:date>2009-11-11T18:36:20Z</dc:date>
      <clearspace:dateToText>1 week, 4 days ago</clearspace:dateToText>
      <clearspace:messageCount>6</clearspace:messageCount>
      <clearspace:replyCount>5</clearspace:replyCount>
    </item>
    <item>
      <title>Omitting VM's associated with DRS Rules</title>
      <link>http://communities.vmware.com/thread/242033</link>
      <description>&lt;br /&gt;
I'm so freakin' close, I can smell it, but don't think my desk can handle anymore head banging.&lt;br /&gt;
&lt;p /&gt;
$Cluster = Get-Cluster ClusterName&lt;br /&gt;
&lt;p /&gt;
$DRS = $Cluster | get-drsrule | % {$_.VMIds}&lt;br /&gt;
&lt;p /&gt;
$VMS = $Cluster | Get-VM | where {$_.Id -notmatch $DRS}&lt;br /&gt;
&lt;p /&gt;
I've tried -notcontains, -inotcontains,  inotmatch, etc. to no avail.  Any help would be appreciated.  Can't figure out how to get powershell to handle the array. &lt;br /&gt;
&lt;p /&gt;
P.S. - "$VMS = $Cluster | Get-VM | where {$_.Id -notmatch $DRS[0]}" does work. &lt;br /&gt;
&lt;p /&gt;
K. Chris Nakagaki (Zsoldier)&lt;br /&gt;
&lt;a class="jive-link-external" href="http://tech.zsoldier.com/"&gt;http://tech.zsoldier.com&lt;/a&gt;</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powershell</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powercli</category>
      <pubDate>Wed, 11 Nov 2009 23:06:51 GMT</pubDate>
      <author>Zsoldier</author>
      <guid>http://communities.vmware.com/thread/242033</guid>
      <dc:date>2009-11-11T23:06:51Z</dc:date>
      <clearspace:dateToText>1 week, 4 days ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Way to report on Orphaned .VMDK files</title>
      <link>http://communities.vmware.com/thread/223104</link>
      <description>&lt;br /&gt;
I have looked in multiple locations, however aren't finding what I need.  Many scripts will only report on clusters, or will also register the found VMDK files, which is what I don't want.&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
I would love (as I'm sure others would)  to have a report in a .csv format that will scan my ESX 3.5 update 4 servers in my VC 2.5 update 4, and report any .VMDK files that aren't registered in VC.&lt;br /&gt;
&lt;p /&gt;
 We have iSCSI, storage as well as local storage being used on each server.&lt;br /&gt;
&lt;p /&gt;
 I have searched high and low for something, yet I can't seem to find anything that works.&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
thanks in advance.</description>
      <pubDate>Mon, 27 Jul 2009 19:11:08 GMT</pubDate>
      <author>sp93</author>
      <guid>http://communities.vmware.com/thread/223104</guid>
      <dc:date>2009-07-27T19:11:08Z</dc:date>
      <clearspace:dateToText>1 week, 4 days ago</clearspace:dateToText>
      <clearspace:messageCount>27</clearspace:messageCount>
      <clearspace:replyCount>26</clearspace:replyCount>
    </item>
    <item>
      <title>How to Increase Video RAM</title>
      <link>http://communities.vmware.com/thread/242028</link>
      <description>&lt;br /&gt;
I recently installed ESXi 4.0.0 (Dell PE1950 64Bit server); created a Windows 7 VM (x86 OS).  The VM starts up, but I receive the following:&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Message from vmhost-11.localdomain: Insufficient video RAM. The maximum resolution of the virtual machine will be limited to 1176x885 at 16 bits per pixel. &lt;br /&gt;
To use the configured maximum resolution of 2360x1770 at 16 bits per pixel, increase the amount of video RAM allocated to this virtual machine by setting &lt;br /&gt;
svga.vramSize="16708800" in the virtual machine's configuration file.  &lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
My question is how increase the video RAM in the config file?  With ESXi 3.x, I had the ability to SSH to the server and access the config file.  Using the vSphere PowerCL, I'm don't see a way to increase this as recommended.&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Any help or suggestions would be greatly appreciated.&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Thanks,&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
MR</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">esxi</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vm</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">config</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">filesystem</category>
      <pubDate>Wed, 11 Nov 2009 22:07:53 GMT</pubDate>
      <author>socalvm</author>
      <guid>http://communities.vmware.com/thread/242028</guid>
      <dc:date>2009-11-11T22:07:53Z</dc:date>
      <clearspace:dateToText>1 week, 4 days ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Storage vmotion all vms resident on one datastore to another datastore</title>
      <link>http://communities.vmware.com/thread/241818</link>
      <description>I need to Storage vmotion all vms resident on one datastore to another datastore within the same cluster. All VMS have one vmdk.. has anyone a script or done something similar..</description>
      <pubDate>Tue, 10 Nov 2009 22:04:19 GMT</pubDate>
      <author>jssidhu71</author>
      <guid>http://communities.vmware.com/thread/241818</guid>
      <dc:date>2009-11-10T22:04:19Z</dc:date>
      <clearspace:dateToText>1 week, 5 days ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>Connect-VIServer causing two sessions</title>
      <link>http://communities.vmware.com/thread/242004</link>
      <description>&lt;br /&gt;
We are using VI Toolkit 1.5.  I have powershell embedded in a Visual Studio 2005 C# project through runspaces.  When calling a Connect-VIServer to a 2.5 server it causes two sessions to open only one of which I can disconnect from.  This works fine against a 2.0 server.  And the login works fine from the standard powershell prompt. &lt;br /&gt;
&lt;p /&gt;
 Any ideas?</description>
      <pubDate>Wed, 11 Nov 2009 21:22:37 GMT</pubDate>
      <author>abarilla</author>
      <guid>http://communities.vmware.com/thread/242004</guid>
      <dc:date>2009-11-11T21:22:37Z</dc:date>
      <clearspace:dateToText>1 week, 5 days ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Create alarms by script?</title>
      <link>http://communities.vmware.com/thread/241527</link>
      <description>Hello: &lt;br /&gt;
&lt;br /&gt;
I am trying to create alarms by script and really would  welcome any help. &lt;br /&gt;
&lt;br /&gt;
Right now I am trying to write script that will create basic alarms (for example, Host memory status) that will send SNMP trap if memory reach specific parameters... &lt;br /&gt;
&lt;br /&gt;
Is it possible? &lt;br /&gt;
&lt;br /&gt;
If you have scripts that will create any other alarms and could share them I would be really appreciate it... (I found just a few and cannot get too much out of them). &lt;br /&gt;
&lt;br /&gt;
Thanks, &lt;br /&gt;
qwert</description>
      <pubDate>Mon, 09 Nov 2009 16:40:13 GMT</pubDate>
      <author>qwert1235</author>
      <guid>http://communities.vmware.com/thread/241527</guid>
      <dc:date>2009-11-09T16:40:13Z</dc:date>
      <clearspace:dateToText>1 week, 5 days ago</clearspace:dateToText>
      <clearspace:messageCount>8</clearspace:messageCount>
      <clearspace:replyCount>7</clearspace:replyCount>
    </item>
    <item>
      <title>PowerCLI restrictions ?</title>
      <link>http://communities.vmware.com/thread/241326</link>
      <description>Hi all,&lt;br /&gt;
I started to do some testing with the PowerCLI but noticed an annoying thing which is that not all commands are available in the ESXi4 free version.&lt;br /&gt;
Recently I played with a ESXi 4 host which was running the free 60 days version.&lt;br /&gt;
With this version this command works: ShutdownHost_Task&lt;br /&gt;
&lt;br /&gt;
So I tried it on my own ESXi 3.5 server which has the free license code applied to and get a response like this:&lt;br /&gt;
&lt;br /&gt;
Exception calling "ShutdownHost_Task" with "1" argument(s): "fault.RestrictedVersion.summary"&lt;br /&gt;
&lt;br /&gt;
I then applied the free license code to my trial ESXi 4 host and wasn't surprised that after I applied the license that the command wasn't working anymore. Is there a list of available commands for the free licensed ESXi or is it trial and error ?&lt;br /&gt;
&lt;br /&gt;
Why isn't it possible to do the same I can do with the vSphere Client GUI (Shutdown/Restart) from a command line utility ?&lt;br /&gt;
&lt;br /&gt;
Sorry if it sounds like a rant, it shouldn't sound like one &lt;img class="jive-emoticon" border="0" src="http://communities.vmware.com/images/emoticons/wink.gif" alt=";)" /&gt;</description>
      <pubDate>Sun, 08 Nov 2009 13:07:28 GMT</pubDate>
      <author>Bernd Nowak</author>
      <guid>http://communities.vmware.com/thread/241326</guid>
      <dc:date>2009-11-08T13:07:28Z</dc:date>
      <clearspace:dateToText>1 week, 5 days ago</clearspace:dateToText>
      <clearspace:messageCount>7</clearspace:messageCount>
      <clearspace:replyCount>6</clearspace:replyCount>
    </item>
    <item>
      <title>Question about getting Size of Virtual Machine</title>
      <link>http://communities.vmware.com/thread/241545</link>
      <description>Hello all, I have a problem that I am working&lt;br /&gt;
on.  I need to get the size of a virtual machine that was created and space on the datastore. Is that possible via Power&lt;br /&gt;
Shell?</description>
      <pubDate>Mon, 09 Nov 2009 20:14:15 GMT</pubDate>
      <author>timgerr</author>
      <guid>http://communities.vmware.com/thread/241545</guid>
      <dc:date>2009-11-09T20:14:15Z</dc:date>
      <clearspace:dateToText>1 week, 5 days ago</clearspace:dateToText>
      <clearspace:messageCount>4</clearspace:messageCount>
      <clearspace:replyCount>3</clearspace:replyCount>
    </item>
    <item>
      <title>Alarm Settings via Powershell GUI</title>
      <link>http://communities.vmware.com/thread/241677</link>
      <description>&lt;br /&gt;
Hi all,&lt;br /&gt;
&lt;p /&gt;
 my collegue have found a little Powershell script that allow to set Alarms via GUI. The GUI is writen with PS. He mean that is here in th Forum but I can&amp;acute;t founded. &lt;br /&gt;
&lt;p /&gt;
 thanks for help &lt;br /&gt;
&lt;p /&gt;
benjo</description>
      <pubDate>Tue, 10 Nov 2009 10:35:45 GMT</pubDate>
      <author>Benomatic</author>
      <guid>http://communities.vmware.com/thread/241677</guid>
      <dc:date>2009-11-10T10:35:45Z</dc:date>
      <clearspace:dateToText>1 week, 5 days ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Script for Migrating all contents from one Virtual centre to another for a particular DataCentre including folder structure within VM's &amp;#38; Templates view</title>
      <link>http://communities.vmware.com/thread/163789</link>
      <description>&lt;br /&gt;
Has anyone a script that will Migrate all contents from one Virtual centre to another for a particular DataCentre including folder structure within VMs and Templates view..?</description>
      <pubDate>Mon, 18 Aug 2008 21:19:38 GMT</pubDate>
      <author>jssidhu71</author>
      <guid>http://communities.vmware.com/thread/163789</guid>
      <dc:date>2008-08-18T21:19:38Z</dc:date>
      <clearspace:dateToText>1 week, 6 days ago</clearspace:dateToText>
      <clearspace:messageCount>12</clearspace:messageCount>
      <clearspace:replyCount>11</clearspace:replyCount>
    </item>
    <item>
      <title>Connect-VIServer and Single Sign-on</title>
      <link>http://communities.vmware.com/thread/158757</link>
      <description>Hi all,&lt;br /&gt;
As part of update2 release note there is this section&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Windows Single Sign-on Support&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;You can now automatically authenticate to VirtualCenter using your current Windows domain login credentials on the local workstation, as long as the credentials are valid on the VirtualCenter server. This capability also supports logging in to Windows using Certificates and Smartcards. It can be used with the VI Client or the VI Remote CLI to ensure that scripts written using the &lt;u&gt;VI Toolkits&lt;/u&gt; can take advantage of the Windows credentials of your current session to automatically connect to VirtualCenter.&lt;/i&gt;&lt;br /&gt;
&lt;p /&gt;
So I have expected to be able to use VIPowerShell (now named VIToolkit) without providing credential during the Connect-Viserver... But this does not works (I use the upd2 VC &amp;#38; upd2 VIPSToolkit)&lt;br /&gt;
Does some-one has been able use the Connect-VIServer in &lt;b&gt;real&lt;/b&gt; sigle sign-on ?</description>
      <pubDate>Tue, 29 Jul 2008 09:29:03 GMT</pubDate>
      <author>Flapoly</author>
      <guid>http://communities.vmware.com/thread/158757</guid>
      <dc:date>2008-07-29T09:29:03Z</dc:date>
      <clearspace:dateToText>1 week, 6 days ago</clearspace:dateToText>
      <clearspace:messageCount>25</clearspace:messageCount>
      <clearspace:replyCount>24</clearspace:replyCount>
    </item>
    <item>
      <title>Running VI script as a scheduled task - credential issue</title>
      <link>http://communities.vmware.com/thread/192244</link>
      <description>&lt;br /&gt;
G'day!&lt;br /&gt;
&lt;br /&gt;
I've writen a small scripts to extract our Datastore info and pump out to a CSV file so our Cognos Reporting system can pick it up and report on it.&lt;br /&gt;
&lt;p /&gt;
&lt;span style="color:#0000ff"&gt;Get-VC &lt;i&gt;ourVCserver&lt;/i&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;span style="color:#0000ff"&gt;$date = Get-Date -f "ddMMyyyyHHmm"&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;span style="color:#0000ff"&gt;Get-Datastore | Select-Object -property "Name","FreeSpaceMB","CapacityMB" | Sort-Object Name | &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;span style="color:#0000ff"&gt;Export-Csv d:\VMWareDataStores$date.csv -noTypeInformation &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;p /&gt;
This works a treat, but the problem is that I want to schedule this script to run as a Windows Scheduled Task at pre-set times. I created a local user account on the VC Server for this purpose. If I do a RunAs on the VI Toolkit, when I execute Get-VC with our server name I get back..&lt;br /&gt;
&lt;p /&gt;
&lt;span style="color:#ff0000"&gt;Connect-VIServer : C:\Program Files\VMware\Infrastructure\VIToolkitForWindows\%&lt;br /&gt;
APPDATA%\VMware\credstore&lt;br /&gt;
At line:1 char:6&lt;br /&gt;
+ get-vc &amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;span style="color:#000000"&gt;If I run the VI Toolkit without RunAs, no worries.  I can execute Get-VC and it will connect as my account but it wont work under a RunAs which leads me to suspect it wont work via a scheduled task.  so the main question from all of this is how do I properly execute this script without hardcoding credentials in clear text into the script by simply using the credentials with which the VI Toolkit was run?&lt;/span&gt;&lt;br /&gt;
&lt;p /&gt;
Cheers,&lt;br /&gt;
&lt;p /&gt;
Dave</description>
      <pubDate>Tue, 03 Feb 2009 04:54:30 GMT</pubDate>
      <author>roity57</author>
      <guid>http://communities.vmware.com/thread/192244</guid>
      <dc:date>2009-02-03T04:54:30Z</dc:date>
      <clearspace:dateToText>1 week, 6 days ago</clearspace:dateToText>
      <clearspace:messageCount>6</clearspace:messageCount>
      <clearspace:replyCount>5</clearspace:replyCount>
    </item>
    <item>
      <title>how to get a Lun number from StorageDeviceInfo property to match a DeviceName or DevicePath?</title>
      <link>http://communities.vmware.com/thread/241113</link>
      <description>&lt;br /&gt;
Hello,&lt;br /&gt;
&lt;p /&gt;
I'm new in powershell script and I have a basic question. I try to get a LUN Number from a disk connected to an ESX server. I want this because I want to add a rdm disk to a VM but in vsphere we have to specify the device name which is unique. So to easily identify the rdm LUN I want to match the LUN Number with the device name in the property StorageDeviceInfo.&lt;br /&gt;
&lt;p /&gt;
Is anyone know a easy way to do that?&lt;br /&gt;
&lt;p /&gt;
Thank you&lt;br /&gt;
&lt;p /&gt;
Sylvain</description>
      <pubDate>Fri, 06 Nov 2009 14:35:40 GMT</pubDate>
      <author>sylvain82</author>
      <guid>http://communities.vmware.com/thread/241113</guid>
      <dc:date>2009-11-06T14:35:40Z</dc:date>
      <clearspace:dateToText>1 week, 6 days ago</clearspace:dateToText>
      <clearspace:messageCount>4</clearspace:messageCount>
      <clearspace:replyCount>3</clearspace:replyCount>
    </item>
    <item>
      <title>PowerCLI - Datastores and LUNs.... Argh!!!</title>
      <link>http://communities.vmware.com/thread/240466</link>
      <description>Hello&lt;br /&gt;
&lt;br /&gt;
I am new to vSphere PowerCLI (just over a month of dabbling), and I'm building up a script that we can use to perform various operations.&lt;br /&gt;
&lt;br /&gt;
My current hurdle is how to find out what LUN a datastore is on. The vSphere Client shows this data with apparent ease.&lt;br /&gt;
&lt;br /&gt;
I can obviously get info for a datastore: &lt;br /&gt;
&lt;br /&gt;
$objDataStore = get-datastore -name "PLOEVA01_VMFS_001" &lt;br /&gt;
&lt;br /&gt;
$objDataStore | Format-List &lt;br /&gt;
&lt;br /&gt;
FreeSpaceMB : 467655&lt;br /&gt;
CapacityMB : 511744&lt;br /&gt;
Accessible : True&lt;br /&gt;
Type : VMFS&lt;br /&gt;
Id : Datastore-datastore-113&lt;br /&gt;
Name : PLOEVA01_VMFS_001 &lt;br /&gt;
&lt;p /&gt;
...and I can then get a .NET view, and delve a bit deeper: &lt;br /&gt;
&lt;p /&gt;
$objDataStoreView = Get-View -id $objDataStore.id&lt;br /&gt;
$objDataStoreView &lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
Info : VMware.Vim.VmfsDatastoreInfo&lt;br /&gt;
Summary : VMware.Vim.DatastoreSummary&lt;br /&gt;
Host : {VMware.Vim.ManagedObjectReference, VMware.Vim.ManagedObjectReference}&lt;br /&gt;
Vm : {VMware.Vim.ManagedObjectReference, VMware.Vim.ManagedObjectReference, VMware.Vim.ManagedObjectRe&lt;br /&gt;
ference, VMware.Vim.ManagedObjectReference}&lt;br /&gt;
Browser : VMware.Vim.ManagedObjectReference&lt;br /&gt;
Capability : VMware.Vim.DatastoreCapability&lt;br /&gt;
Parent : VMware.Vim.ManagedObjectReference&lt;br /&gt;
CustomValue : {}&lt;br /&gt;
OverallStatus : green&lt;br /&gt;
ConfigStatus : gray&lt;br /&gt;
ConfigIssue : {}&lt;br /&gt;
EffectiveRole : {-1, 5}&lt;br /&gt;
Permission : {}&lt;br /&gt;
Name : PLOEVA01_VMFS_001&lt;br /&gt;
DisabledMethod : {}&lt;br /&gt;
RecentTask : {}&lt;br /&gt;
DeclaredAlarmState : {alarm-9.datastore-113}&lt;br /&gt;
TriggeredAlarmState : {}&lt;br /&gt;
AlarmActionsEnabled : True&lt;br /&gt;
Tag : {}&lt;br /&gt;
Value : {}&lt;br /&gt;
AvailableField : {}&lt;br /&gt;
MoRef : VMware.Vim.ManagedObjectReference&lt;br /&gt;
Client : VMware.Vim.VimClient &lt;br /&gt;
&lt;p /&gt;
...the Info and Summary properties give some additional info: &lt;br /&gt;
&lt;p /&gt;
$objDataStoreView.info &lt;br /&gt;
&lt;p /&gt;
Vmfs : VMware.Vim.HostVmfsVolume&lt;br /&gt;
Name : PLOEVA01_VMFS_001&lt;br /&gt;
Url : sanfs://vmfs_uuid:4a6daf9a-fde9d1f2-ee8b-001b784495e2/&lt;br /&gt;
FreeSpace : 490371809280&lt;br /&gt;
MaxFileSize : 274877906944&lt;br /&gt;
Timestamp : 03/11/2009 14:18:46&lt;br /&gt;
DynamicType :&lt;br /&gt;
DynamicProperty : &lt;br /&gt;
&lt;p /&gt;
$objDataStoreView.summary &lt;br /&gt;
&lt;p /&gt;
Datastore : VMware.Vim.ManagedObjectReference&lt;br /&gt;
Name : PLOEVA01_VMFS_001&lt;br /&gt;
Url : sanfs://vmfs_uuid:4a6daf9a-fde9d1f2-ee8b-001b784495e2/&lt;br /&gt;
Capacity : 536602476544&lt;br /&gt;
FreeSpace : 490371809280&lt;br /&gt;
Uncommitted : 8694775296&lt;br /&gt;
Accessible : True&lt;br /&gt;
MultipleHostAccess : True&lt;br /&gt;
Type : VMFS&lt;br /&gt;
DynamicType :&lt;br /&gt;
DynamicProperty : &lt;br /&gt;
&lt;p /&gt;
...but I just cannot find a correlation between this and a LUN. In desperation, I knocked up a routine (below) which enumerates the fibre HBAs in a given host, enumerates the visible LUNs, then the paths, picks the active paths and reports any paths that lead to a fibre disk. The last step would be to list the datastores on this disk. But how? &lt;br /&gt;
&lt;p /&gt;
Any thoughts... anyone? &lt;br /&gt;
&lt;p /&gt;
Thank you &lt;br /&gt;
&lt;p /&gt;
Simon Catlin&lt;br /&gt;
&lt;img src="http://communities.vmware.com/images/emoticons/cry.gif" alt="http://communities.vmware.com/images/emoticons/cry.gif" class="jive-image"  /&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;br /&gt;
&lt;hr /&gt;
MY FUNCTION FOR ENUMERATING A HOST'S STORAGE:&lt;br /&gt;
&lt;p /&gt;
&amp;lt;See EXAMPLE_CODE.TXT attachment&amp;gt;&lt;br /&gt;
&lt;p /&gt;
 EXAMPLE OUTPUT:&lt;br /&gt;
&lt;p /&gt;
&amp;lt;See EXAMPLE_OUTPUT.txt attachment&amp;gt;</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powercli</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">datastore</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">lun</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">storage</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">get-view</category>
      <pubDate>Tue, 03 Nov 2009 15:36:18 GMT</pubDate>
      <author>catman</author>
      <guid>http://communities.vmware.com/thread/240466</guid>
      <dc:date>2009-11-03T15:36:18Z</dc:date>
      <clearspace:dateToText>1 week, 6 days ago</clearspace:dateToText>
      <clearspace:messageCount>7</clearspace:messageCount>
      <clearspace:replyCount>6</clearspace:replyCount>
    </item>
    <item>
      <title>Setting Custom-Fields via New-VM?</title>
      <link>http://communities.vmware.com/thread/241571</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
in our environment we have a custom field for the VM´s which is named "Kostenstelle".&lt;br /&gt;
&lt;br /&gt;
I´ve build a little script to create my VM´s. With this script I am also setting the Description of the VM. Now&lt;br /&gt;
I want to set the Value for the custom field "Kostenstelle".&lt;br /&gt;
&lt;br /&gt;
Can anyone help?&lt;br /&gt;
&lt;br /&gt;
Thx&lt;br /&gt;
&lt;br /&gt;
Chakoe</description>
      <pubDate>Mon, 09 Nov 2009 20:58:16 GMT</pubDate>
      <author>chakoe</author>
      <guid>http://communities.vmware.com/thread/241571</guid>
      <dc:date>2009-11-09T20:58:16Z</dc:date>
      <clearspace:dateToText>2 weeks, 4 hours ago</clearspace:dateToText>
      <clearspace:messageCount>2</clearspace:messageCount>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>scripts for Update Manager in vSphere4</title>
      <link>http://communities.vmware.com/thread/241543</link>
      <description>Hello: &lt;br /&gt;
&lt;br /&gt;
I am trying to use some scripts that I successfully used in VI3 in my vSphere 4 environment, but have troubles... &lt;br /&gt;
&lt;br /&gt;
Should I be able to do it or VMware changed something? &lt;br /&gt;
Should cmdlet "Get-Baseline" still work? &lt;br /&gt;
&lt;br /&gt;
I am getting the term 'get-baseline' is not recognized as a cmdlet... &lt;br /&gt;
&lt;br /&gt;
Thanks</description>
      <pubDate>Mon, 09 Nov 2009 20:00:49 GMT</pubDate>
      <author>olegarr</author>
      <guid>http://communities.vmware.com/thread/241543</guid>
      <dc:date>2009-11-09T20:00:49Z</dc:date>
      <clearspace:dateToText>2 weeks, 5 hours ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Script to count VMotions per VM</title>
      <link>http://communities.vmware.com/thread/241174</link>
      <description>&lt;p /&gt;
&lt;p /&gt;
&lt;br /&gt;
Looking for a script that will report how many times a VM has migrated witing a give timeframe.  -Start date to End date.&lt;br /&gt;
&lt;p /&gt;
 Output it to .csv file.&lt;br /&gt;
&lt;p /&gt;
 Main purpose is to check if the same VM9s) are constantly migrating with DRS automatic set.&lt;br /&gt;
&lt;p /&gt;
Yes I could set DRS to "partially automatic" and track it manually but that won't capture the overnight activity.&lt;br /&gt;
&lt;p /&gt;
Thanks.</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vmotion</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">drs</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">count</category>
      <pubDate>Fri, 06 Nov 2009 19:34:52 GMT</pubDate>
      <author>rassini</author>
      <guid>http://communities.vmware.com/thread/241174</guid>
      <dc:date>2009-11-06T19:34:52Z</dc:date>
      <clearspace:dateToText>2 weeks, 12 hours ago</clearspace:dateToText>
      <clearspace:messageCount>6</clearspace:messageCount>
      <clearspace:replyCount>5</clearspace:replyCount>
    </item>
    <item>
      <title>Powershell syntax to check whether a VM exists</title>
      <link>http://communities.vmware.com/thread/241409</link>
      <description>I've written a Powershell script that prompts the user for a VM host name and stores the value into variable "$desktop". Following this the VM is powered on  via the get-vm command i.e. (get-vm -name "$desktop") ..... However, if the hostname does not exist a powershell error is displayed and the script is aborted.&lt;br /&gt;
&lt;br /&gt;
What I'd like to ask is whether there is a method to query VirtualCenter to check whether the VM hostname exists, prior to issuing get-vm command. Can anyone help with the appropriate syntax?&lt;br /&gt;
&lt;br /&gt;
Thanks</description>
      <pubDate>Mon, 09 Nov 2009 10:12:59 GMT</pubDate>
      <author>joeflint</author>
      <guid>http://communities.vmware.com/thread/241409</guid>
      <dc:date>2009-11-09T10:12:59Z</dc:date>
      <clearspace:dateToText>2 weeks, 15 hours ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Get-VM Generates Error:  Unable to read data from the transport connection</title>
      <link>http://communities.vmware.com/thread/237097</link>
      <description>&lt;p /&gt;
When I try to use WindowsPowershell or vSpher PowerCLI to excute Get-VM or Get-VM Server "mysrvname" I get the below error. Other commands work fine. I'm at wits, please help! &lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
These work fine&lt;br /&gt;
&lt;p /&gt;
Get-VMHost&lt;br /&gt;
Get-Template&lt;br /&gt;
Get-Cluster &lt;br /&gt;
&lt;br /&gt;
&lt;a class="jive-link-adddocument" href="http://communities.vmware.com/community-document-picker.jspa?communityID=&amp;subject=vSphere+PowerCLI"&gt;vSphere PowerCLI&lt;/a&gt; D:\Program Files\VMware\Infrastructure\vSphere PowerCLI&amp;gt; Get-VM&lt;br /&gt;
Get-VM : 10/16/2009 12:35:16 AM    ****Get-VM    5EA98C9E-8AEC-4EEA-9251-B214481D908B    Unable to read data from the transport connection: The connection was closed.****&lt;br /&gt;
**At line:1 char:6**&lt;br /&gt;
+ Get-VM &amp;lt;&amp;lt;&amp;lt;&amp;lt; &lt;br /&gt;
&lt;br /&gt;
Additional Info, that might help...&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;VMware vCenter Server 4.0.0 build-162856&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;VMware ESX 3.5.0 build-123630&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;VMware ESX 3.5.0 build-163429&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;VMware ESX 4.0.0 build-164009&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;VMware ESX 4.0.0 build-175625&lt;/i&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">get-vm_not_working</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">get-vm_error</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">get-vm</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">unable_to_read_data_from_the_transport_connection</category>
      <pubDate>Fri, 16 Oct 2009 05:01:32 GMT</pubDate>
      <author>the_gonzo</author>
      <guid>http://communities.vmware.com/thread/237097</guid>
      <dc:date>2009-10-16T05:01:32Z</dc:date>
      <clearspace:dateToText>2 weeks, 3 days ago</clearspace:dateToText>
      <clearspace:messageCount>10</clearspace:messageCount>
      <clearspace:replyCount>9</clearspace:replyCount>
    </item>
    <item>
      <title>Manage Folder in   Home - Inventory - Networking</title>
      <link>http://communities.vmware.com/thread/241127</link>
      <description>Hi all, &lt;br /&gt;
&lt;br /&gt;
I try to work with &lt;b&gt;Network Folder&lt;/b&gt;  and &lt;b&gt;PowerCli&lt;/b&gt; without success  &lt;img src="http://communities.vmware.com/images/emoticons/confused.gif" alt="http://communities.vmware.com/images/emoticons/confused.gif" class="jive-image"  /&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
&lt;img src="http://communities.vmware.com/servlet/JiveServlet/downloadImage/7558/VMW01.JPG" alt="http://communities.vmware.com/servlet/JiveServlet/downloadImage/7558/VMW01.JPG" class="jive-image"  /&gt; &lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
How I can script &lt;b&gt;Folder creation&lt;/b&gt; and Move VM Port Group in target folder like below ?&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
&lt;img src="http://communities.vmware.com/servlet/JiveServlet/downloadImage/7560/VMW02.JPG" alt="http://communities.vmware.com/servlet/JiveServlet/downloadImage/7560/VMW02.JPG" class="jive-image"  /&gt; &lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;br /&gt;
Thanks in advance  &lt;img src="http://communities.vmware.com/images/emoticons/grin.gif" alt="http://communities.vmware.com/images/emoticons/grin.gif" class="jive-image"  /&gt; &lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
FYI, When I try to select Network Folder in Datacenter Shell say "Folder with name 'Network' not found, using the specified filter(s)." &lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
$dcName = $args[0]&lt;br /&gt;
$dc = Get-Datacenter -Name $dcName&lt;br /&gt;
$parent = Get-Folder "Network"</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">network</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">folder</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">creation</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powershell</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powercli</category>
      <pubDate>Fri, 06 Nov 2009 15:07:00 GMT</pubDate>
      <author>Math34</author>
      <guid>http://communities.vmware.com/thread/241127</guid>
      <dc:date>2009-11-06T15:07:00Z</dc:date>
      <clearspace:dateToText>2 weeks, 3 days ago</clearspace:dateToText>
      <clearspace:messageCount>2</clearspace:messageCount>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>Disconnecting iSCSI target via script?</title>
      <link>http://communities.vmware.com/thread/241037</link>
      <description>&lt;br /&gt;
Anyone know a way to script (or command line) a disconnect (remove) of a iSCSI target?&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;br /&gt;</description>
      <pubDate>Thu, 05 Nov 2009 22:37:00 GMT</pubDate>
      <author>bobcampling</author>
      <guid>http://communities.vmware.com/thread/241037</guid>
      <dc:date>2009-11-05T22:37:00Z</dc:date>
      <clearspace:dateToText>2 weeks, 3 days ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Reporting through Powershell</title>
      <link>http://communities.vmware.com/thread/184423</link>
      <description>Hi All,&lt;br /&gt;
&lt;br /&gt;
I was wondering if anyone had any 'already setup' scripts that can run basic reports on ESX through VI Powershell?&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
Thanks to all in advance. I'm not much of a scritping person, and if anyone has anything already going that is helpful would be much appreciated.&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
Cheers.</description>
      <pubDate>Thu, 11 Dec 2008 04:56:33 GMT</pubDate>
      <author>ronmanu07</author>
      <guid>http://communities.vmware.com/thread/184423</guid>
      <dc:date>2008-12-11T04:56:33Z</dc:date>
      <clearspace:dateToText>2 weeks, 3 days ago</clearspace:dateToText>
      <clearspace:messageCount>29</clearspace:messageCount>
      <clearspace:replyCount>28</clearspace:replyCount>
    </item>
    <item>
      <title>change all vm's to enhanced vmxnet + ip address</title>
      <link>http://communities.vmware.com/thread/232599</link>
      <description>&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;p /&gt;
I wan't to change the networkcard on all our vm's to enhancedvmxnet, for this i created a script. But one problem resided, and that is configuring the ip adres inside the vm.&lt;br /&gt;
&lt;p /&gt;
Who has got a snippet for that?&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Thanks.</description>
      <pubDate>Mon, 21 Sep 2009 09:26:49 GMT</pubDate>
      <author>RobMokkink</author>
      <guid>http://communities.vmware.com/thread/232599</guid>
      <dc:date>2009-09-21T09:26:49Z</dc:date>
      <clearspace:dateToText>2 weeks, 3 days ago</clearspace:dateToText>
      <clearspace:messageCount>13</clearspace:messageCount>
      <clearspace:replyCount>12</clearspace:replyCount>
    </item>
    <item>
      <title>Looping through two arrays to find a match</title>
      <link>http://communities.vmware.com/thread/240773</link>
      <description>HI, I am working on a migration at the moment.  Almost every disk has to be resized, so I started writing some script.&lt;br /&gt;
&lt;br /&gt;
I am in my second month of powershell'ing so still learning.  I am having trouble matching two arrays.&lt;br /&gt;
&lt;br /&gt;
Basically I collect disk metrics using an SQL statement from VC database.  This array has the VM path, space used, total capacity.  &lt;br /&gt;
From this I can create the first array ($DiskNewSizes) which contains, Existing HD size, new HD size based on a target free space percentage.&lt;br /&gt;
The second array ($vmDisks) is simply get-harddisk from vm.&lt;br /&gt;
&lt;br /&gt;
Because this is no direct link (or I cant find it) between the logical view and physical view I and trying to match the disk based on existing capacity.&lt;br /&gt;
I am round the hard disk capacity and looking for a match.  If the is one match, use set-harddisk to resize.  If 0 or more than 1 you need to do it manually.  &lt;br /&gt;
&lt;br /&gt;
This partly work, but with more disk has issues.  I realize my issue with this syntax is that I am incrementing (+=) the array before knowing if ($DiskNewSizes) has a match but I am running myself in circles trying to figure out how to do it?&lt;br /&gt;
&lt;br /&gt;
Any suggestions would be great.  &lt;br /&gt;
&lt;p /&gt;
....	Write-Host 'Attempting Hard disk resize'&lt;br /&gt;
	$DiskMatch = @()&lt;br /&gt;
	foreach ($resize in $vmDisks) {&lt;br /&gt;
		$DiskMatch = @()&lt;br /&gt;
		$DiskMatch += $DiskNewSizes | where {&lt;a class="jive-link-adddocument" href="http://communities.vmware.com/community-document-picker.jspa?communityID=&amp;subject=Math"&gt;Math&lt;/a&gt;::round($_.CurrentCapacity /100, 0) -eq &lt;a class="jive-link-adddocument" href="http://communities.vmware.com/community-document-picker.jspa?communityID=&amp;subject=Math"&gt;Math&lt;/a&gt;::round(($resize.capacitykb /1024 )  /100, 0)} &lt;br /&gt;
&lt;p /&gt;
		if ($DiskMatch.count -eq 1) {&lt;br /&gt;
			$NewSizeKB = $DiskMatch.NewCapacity * 1024&lt;br /&gt;
			Write-Host 'Match found resizing' $resize.Name $diskmatch.path 'from' $resize.CapacityKB 'KB to' $NewSizeKB 'KB'&lt;br /&gt;
			Set-HardDisk -HardDisk $resize -CapacityKB $NewSizeKB -whatif&lt;br /&gt;
		}&lt;br /&gt;
		elseif ($DiskMatch.count -gt 1) {&lt;br /&gt;
			Write-Host "Can't match disks manual resize required"&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
Matt.</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">harddisks</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powershell</category>
      <pubDate>Wed, 04 Nov 2009 20:26:11 GMT</pubDate>
      <author>Matthewq</author>
      <guid>http://communities.vmware.com/thread/240773</guid>
      <dc:date>2009-11-04T20:26:11Z</dc:date>
      <clearspace:dateToText>2 weeks, 4 days ago</clearspace:dateToText>
      <clearspace:messageCount>4</clearspace:messageCount>
      <clearspace:replyCount>3</clearspace:replyCount>
    </item>
    <item>
      <title>credentials not passed to script run as a scheduled task</title>
      <link>http://communities.vmware.com/thread/240979</link>
      <description>I'm creating a new thread since I've not seen any action on the existing one where I posted (not sure if anyone saw it due to the age of the thread).  For reference, see &lt;a class="jive-link-external" href="http://communities.vmware.com/message/1406190"&gt;http://communities.vmware.com/message/1406190&lt;/a&gt;.  But the gist of it is that running a script as a scheduled task is not properly passing the Windows service account credentials to the Connect-VIServer cmdlet.  When that cmdlet is run it throws the following error:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color:#ff0000"&gt;Connect-VIServer : &amp;lt;SourcePath&amp;gt;\%APPDATA%\VMware\credstore&lt;br /&gt;
At &amp;lt;SourcePath&amp;gt;\scriptname.ps1:41 char:17&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
So anyway, rumor was that it was fixed in PowerCLI 4.0, but that does not appear to be the case as Alan Renouf (and now me) have reported.  On to my original post in that thread...&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
My two cents to Rob, Luc, and Alan. I have had this problem with PowerCLI 4 as well. However, I think maybe it is sort of fixed. Here's my situation:&lt;br /&gt;
&lt;br /&gt;
1) I have an AD service account that has the appropriate vCenter permissions.&lt;br /&gt;
&lt;br /&gt;
2) I run the scheduled PShell task with this AD service account while logged into the server and it of course works fine.&lt;br /&gt;
&lt;br /&gt;
3) I log out.&lt;br /&gt;
&lt;br /&gt;
4) Script continues to run fine until the server is rebooted (which of course happens each month for Microsoft patches).&lt;br /&gt;
&lt;br /&gt;
5) To fix it I can simply log in with my service account and just log right back out--I don't even have to interactively run the script to fix it.&lt;br /&gt;
&lt;br /&gt;
So it seems to me that logging in must create the %APPDATA% environment variable and apparently logging out doesn't clear the variable properly or something.&lt;br /&gt;
&lt;br /&gt;
My main question is, why is "Connect-VIServer" even trying to make a call to this path? Shouldn't it only do that when I call "Get-VICredentialStoreItem"? My script is simply doing:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;[string]$strVCServer = &amp;quot;servername.domain&amp;quot;
Connect-VIServer -Server $strVCServer
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
I'm not trying to save any credentials as pass-through should work fine and be somewhat more secure.</description>
      <pubDate>Thu, 05 Nov 2009 17:48:45 GMT</pubDate>
      <author>allencrawford</author>
      <guid>http://communities.vmware.com/thread/240979</guid>
      <dc:date>2009-11-05T17:48:45Z</dc:date>
      <clearspace:dateToText>2 weeks, 4 days ago</clearspace:dateToText>
      <clearspace:messageCount>2</clearspace:messageCount>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>Fully rehydrating a Vimclient from Vim.dll</title>
      <link>http://communities.vmware.com/thread/240798</link>
      <description>&lt;br /&gt;
Not for Powershell, but the undelrying Vim.dll.&lt;br /&gt;
&lt;p /&gt;
I wish to use this in a web environ and rather than deal with file management nightmares I want to scrape the vmware_soap_session cookie, serialize the value for it, and restore the session from the cookie on the callback rather than relogging in etc.&lt;br /&gt;
&lt;p /&gt;
Well I have the cookie and the reconnect done, but after restoring the Cookie I still have a null ServiceContent.  The LoadSession does not have this issue so I imagine there is something I can do to kick the VimClient so it reestablishes the underlying connection. Seems like if I call a GetView for a known entity that can help, but it seems rather brute force.  Is there a more elegant way to reestablish the connection after restoring the cookie?&lt;br /&gt;
&lt;p /&gt;
Also, I wish to second the need for a VimClient method for determining if a session is live after restoring.  I used to just call CurrentTime on ServiceInstance in the WebServices and capture the exception.  The "isSessionActive" in SessionManager needs the username and rather than having to carry that around tooit would be easier to have a bool that used the currentSession data in the cookie.  In any case before kicking the VimClient SessionManager is null so its a no go anyways.&lt;br /&gt;
&lt;p /&gt;
J</description>
      <pubDate>Wed, 04 Nov 2009 20:42:52 GMT</pubDate>
      <author>jrackliffe</author>
      <guid>http://communities.vmware.com/thread/240798</guid>
      <dc:date>2009-11-04T20:42:52Z</dc:date>
      <clearspace:dateToText>2 weeks, 4 days ago</clearspace:dateToText>
      <clearspace:messageCount>6</clearspace:messageCount>
      <clearspace:replyCount>5</clearspace:replyCount>
    </item>
    <item>
      <title>Run scheduled job with SYSTEM account</title>
      <link>http://communities.vmware.com/thread/240908</link>
      <description>In our environment "Administrators" group is not granted any permission in virtual center roles and permissions.&lt;br /&gt;
&lt;br /&gt;
So, I am not able to run scheduled powercli scripts under SYSTEM account. It hangs forever. And as soon as I grant READ-ONLY to administrators group, my sched. So runs with SYSTEM account.&lt;br /&gt;
&lt;br /&gt;
We dont want to grant administrators any rights. There is no option to add SYSTEM account in virtual center roles and permissions applet, so as to grant it READ-ONLY (instead of granting administrators read-only)&lt;br /&gt;
&lt;br /&gt;
Has anyone got any clues as to how can we add SYSTEM as read-only ? or any other ideas about script scheduling.&lt;br /&gt;
&lt;br /&gt;
Thanks</description>
      <pubDate>Thu, 05 Nov 2009 11:50:10 GMT</pubDate>
      <author>harkamal</author>
      <guid>http://communities.vmware.com/thread/240908</guid>
      <dc:date>2009-11-05T11:50:10Z</dc:date>
      <clearspace:dateToText>2 weeks, 4 days ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>Set-VMHostNetworkAdapter hanging</title>
      <link>http://communities.vmware.com/thread/240822</link>
      <description>&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;br /&gt;
Quick overview of my problem:&lt;br /&gt;
&lt;p /&gt;
&lt;ul&gt;
&lt;li&gt;I've got an problem with the cmdlet Set-VMHostNetworkAdapter; I am assigning an IP address and subnet mask with it, and it does this correctly.&lt;/li&gt;
&lt;li&gt;Problem is, that after this cmdlet has done his work, my PowerShell window just "hangs"; it's waiting for an completion message I think from the ESX host.&lt;/li&gt;
&lt;li&gt;This is not possible of course, because the host has another IP address so the active connection is actually not active anymore.&lt;/li&gt;
&lt;/ul&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;br /&gt;
In a Powershell window this is not that much an problem, I can just close the window and restart the PowerShell session.&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
But, I want to use this also in a script to assign an other IP address to an ESX host, and because of the problem of the "hang", my script does not continue to run.&lt;br /&gt;
&lt;br /&gt;
Do you guys have an clue how to solve this?&lt;br /&gt;
&lt;br /&gt;
Regards, Richard&lt;br /&gt;
&lt;br /&gt;
Clarification is a beautiful thing.&lt;br /&gt;
&lt;br /&gt;
Check my site: &lt;a class="jive-link-external" href="http://www.vituality.com"&gt;http://www.vituality.com&lt;/a&gt;</description>
      <pubDate>Thu, 05 Nov 2009 01:44:27 GMT</pubDate>
      <author>rdiphoorn</author>
      <guid>http://communities.vmware.com/thread/240822</guid>
      <dc:date>2009-11-05T01:44:27Z</dc:date>
      <clearspace:dateToText>2 weeks, 4 days ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>% and ? -  meaning in powershell</title>
      <link>http://communities.vmware.com/thread/240909</link>
      <description>&lt;br /&gt;
Can someone please clarify what ? and % mean in powershell cli.&lt;br /&gt;
&lt;p /&gt;
I know one of them means foreach, but dont which one, and not sure what the other one means</description>
      <pubDate>Thu, 05 Nov 2009 13:05:43 GMT</pubDate>
      <author>Guv</author>
      <guid>http://communities.vmware.com/thread/240909</guid>
      <dc:date>2009-11-05T13:05:43Z</dc:date>
      <clearspace:dateToText>2 weeks, 4 days ago</clearspace:dateToText>
      <clearspace:messageCount>2</clearspace:messageCount>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>error adding RDM LUN to VM (File is larger than the maximum size supported by datastore)</title>
      <link>http://communities.vmware.com/thread/240881</link>
      <description>&lt;br /&gt;
Hello,&lt;br /&gt;
&lt;p /&gt;
I'm trying to add a rdm LUN to a VM using the powershell cmd-let &lt;b&gt;New-HardDisk&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
The VM is hosted in a vsphere server (IBM HS22) with latest updates. The host is managed by vcenter and is part of a cluster with 5 other servers&lt;br /&gt;
&lt;p /&gt;
The exact command is:Get-VM $vm | New-HardDisk &lt;i&gt;-DiskType&lt;/i&gt; "rawPhysical" &lt;i&gt;-DeviceName&lt;/i&gt; "/vmfs/devices/disks/vmhba1:C0:T1:L6"&lt;br /&gt;
&lt;p /&gt;
I get the following error message:&lt;br /&gt;
&lt;p /&gt;
New-HardDisk : 11/5/2009 10:45:04 AM    New-HardDisk    523d72ad-fda3-6c7b-a869-52f690e4c63b    The operation for the entity 64 failed with the following message: "File is larger than the maximum size supported by datastore 'DATASTORE-PROD01'.&lt;br /&gt;
 TESTVM2/TESTVM2_3.vmdk"&lt;br /&gt;
&lt;p /&gt;
At D:\scripts\add-rawdisk.ps1:11 char:26&lt;br /&gt;
+ Get-VM $vm | New-HardDisk  &amp;lt;&amp;lt;&amp;lt;&amp;lt; -DiskType "rawPhysical" -DeviceName "/vmfs/devices/disks/vmhba1:C0:T1:L6"&lt;br /&gt;
&lt;p /&gt;
 I've tried with another VM, Datastore and vsphere server. &lt;br /&gt;
&lt;p /&gt;
I don't understand why I get this error because it is a rdm and the rdm LUN is only 20 GB very below the first limit that is 256 GB when block size is set to 1 MB&lt;br /&gt;
&lt;p /&gt;
Your help would be very appreciated.&lt;br /&gt;
&lt;p /&gt;
 Sylvain</description>
      <pubDate>Thu, 05 Nov 2009 10:21:44 GMT</pubDate>
      <author>sylvain82</author>
      <guid>http://communities.vmware.com/thread/240881</guid>
      <dc:date>2009-11-05T10:21:44Z</dc:date>
      <clearspace:dateToText>2 weeks, 4 days ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>VpxSettings</title>
      <link>http://communities.vmware.com/thread/240803</link>
      <description>&lt;br /&gt;
Does anyone know how to pull the OptionManager MOR for the VpxSettings using PowerShell?  &lt;br /&gt;
&lt;p /&gt;
I'm able to pull most of the other MOR's (such as FileManager) from ServiceContent Object  using Get-View -ID FileManager but for some reason I can't pull the settings MOR which is supposedly mapped to the OptionManager MOR assocated with the VpxSettings.  At least from what I can tell.  Please correct me if I have this wrong.&lt;br /&gt;
&lt;p /&gt;
Thanks for your help.&lt;br /&gt;
&lt;p /&gt;
 Fisk</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">optionmanager</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vpxsettings</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powershell</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">api</category>
      <pubDate>Wed, 04 Nov 2009 22:08:22 GMT</pubDate>
      <author>Fisk</author>
      <guid>http://communities.vmware.com/thread/240803</guid>
      <dc:date>2009-11-04T22:08:22Z</dc:date>
      <clearspace:dateToText>2 weeks, 4 days ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Find a host Physical NIC IP address</title>
      <link>http://communities.vmware.com/thread/239870</link>
      <description>&lt;br /&gt;
I am trying to find the IP addresses for my Physical NIC's on each host.&lt;br /&gt;
&lt;p /&gt;
 Following &lt;a class="jive-link-message" href="http://communities.vmware.com/message/1332071#1332071"&gt;http://communities.vmware.com/message/1332071&lt;/a&gt; I cna get the MAC Addresses, but I cannot seem to get the IP Addresses&lt;br /&gt;
&lt;p /&gt;
 Karl</description>
      <pubDate>Fri, 30 Oct 2009 21:27:16 GMT</pubDate>
      <author>KarlMitschke</author>
      <guid>http://communities.vmware.com/thread/239870</guid>
      <dc:date>2009-10-30T21:27:16Z</dc:date>
      <clearspace:dateToText>2 weeks, 5 days ago</clearspace:dateToText>
      <clearspace:messageCount>7</clearspace:messageCount>
      <clearspace:replyCount>6</clearspace:replyCount>
    </item>
    <item>
      <title>[vCenter] Alarm and script being triggered really slow</title>
      <link>http://communities.vmware.com/thread/239447</link>
      <description>&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;p /&gt;
I created an alarm that trigger a powershell script.  &lt;br /&gt;
&lt;p /&gt;
 Here is the script triggered: "C:\PowerOnSpareWeb.bat"&lt;br /&gt;
&lt;p /&gt;
date /t &amp;gt; c:\PowerOnSpareWeb.log&lt;br /&gt;
time /t &amp;gt;&amp;gt; c:\PowerOnSpareWeb.log&lt;br /&gt;
powershell.exe -command "C:\PowerOnSpareWeb.ps1" &amp;gt;&amp;gt; c:\PowerOnSpareWeb.log&lt;br /&gt;
date /t &amp;gt;&amp;gt; c:\PowerOnSpareWeb.log&lt;br /&gt;
time /t &amp;gt;&amp;gt; c:\PowerOnSpareWeb.log &lt;br /&gt;
&lt;p /&gt;
Here is the powershell script: "C:\PowerOnSpareWeb.ps1" (its purpose is to poweron VMimages in a specific ressource pool)&lt;br /&gt;
&lt;p /&gt;
Add-PSSnapin VMware.VimAutomation.Core&lt;br /&gt;
Connect-VIServer -server localhost -User administrator -Password admin&lt;br /&gt;
Get-ResourcePool StandbyWebServers | Get-VM | Start-VM&lt;br /&gt;
&lt;p /&gt;
 The problem i have is the following: &lt;br /&gt;
&lt;p /&gt;
As soon as the alarm is triggered here is what i see: &lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;The script is properly triggered because i can see that a file called PowerOnSpareWeb.log appeared in the c: directory with the date and time&lt;/li&gt;
&lt;li&gt;I can see in my task manager that powershell.exe is starting but then nothing is happening for 5 minutes approx.&lt;/li&gt;
&lt;li&gt;After 5 min. I have an error message in vCenter: A general system error occured: failed to run script: Script timed out, terminated&lt;/li&gt;
&lt;li&gt;As soon as the error message appear, my VM images are powered on as expected&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
What is strange is that if i run my .bat script in command line, everything is running smoothly without any problem&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
So it seems like vCenter is trying to do something and after it timed out it runs the script. &lt;br /&gt;
&lt;p /&gt;
 As anybody faced it already and has a solution ? &lt;br /&gt;
&lt;p /&gt;
 Any help would be really appreciated &lt;br /&gt;
&lt;p /&gt;
Thanks</description>
      <pubDate>Thu, 29 Oct 2009 12:10:02 GMT</pubDate>
      <author>Cayne</author>
      <guid>http://communities.vmware.com/thread/239447</guid>
      <dc:date>2009-10-29T12:10:02Z</dc:date>
      <clearspace:dateToText>2 weeks, 5 days ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>Get-View -ViewType VM list only VM's in a Datastore</title>
      <link>http://communities.vmware.com/thread/240738</link>
      <description>&lt;br /&gt;
All,  I seem to be stumped on something that should be easy.  I imagine it stems from a lack of understanding of Get-View. &lt;br /&gt;
&lt;p /&gt;
I am trying to modify the vCheck v3 script from virtu-al.  In it he uses the line below to get the views of the VM's.  I only want the views of the VM's in a specific datastore.  I have been able to modify the rest of the code, but I'm stuck here.&lt;br /&gt;
&lt;p /&gt;
 $FullVM = Get-View -ViewType VirtualMachine | Where {-not $_.Config.Template}&lt;br /&gt;
&lt;p /&gt;
I've tried:  $FullVM = Get-Datacenter &amp;lt;DATACENTER&amp;gt; | Get-View -ViewType VirtualMachine | Where {-not $_.Config.Template} without luck. Error follows:&lt;br /&gt;
&lt;p /&gt;
Get-View : The input object cannot be bound to any parameters for the command either because the command does not take&lt;br /&gt;
pipeline input or the input and its properties do not match any of the parameters that take pipeline input.&lt;br /&gt;
At line:1 char:25&lt;br /&gt;
+ $FullVM = $DC | Get-View &amp;lt;&amp;lt;&amp;lt;&amp;lt;  -ViewType VirtualMachine | Where {-not $_.Config.Template}&lt;br /&gt;
    + CategoryInfo          : InvalidArgument: (Server Management Denver:PSObject) &lt;a class="jive-link-adddocument" href="http://communities.vmware.com/community-document-picker.jspa?communityID=&amp;subject=Get-View"&gt;Get-View&lt;/a&gt;, ParameterBindingExcepti&lt;br /&gt;
   on&lt;br /&gt;
    + FullyQualifiedErrorId : InputObjectNotBound,VMware.VimAutomation.Commands.DotNetInterop.GetVIView&lt;br /&gt;
&lt;p /&gt;
 Any help would be appreciated, Josh</description>
      <pubDate>Wed, 04 Nov 2009 16:37:23 GMT</pubDate>
      <author>jxstale</author>
      <guid>http://communities.vmware.com/thread/240738</guid>
      <dc:date>2009-11-04T16:37:23Z</dc:date>
      <clearspace:dateToText>2 weeks, 5 days ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>how to make that Customfields automatic insert values?</title>
      <link>http://communities.vmware.com/thread/240380</link>
      <description>&lt;br /&gt;
i want to make that every time a new ivrtual machine is created to a VM is Deployed or a Clone is be made&lt;br /&gt;
&lt;p /&gt;
that some of my custom attributes are automatic insert with info , For example:&lt;br /&gt;
&lt;p /&gt;
Domain attribute with but the Domain name of that machine&lt;br /&gt;
&lt;p /&gt;
Os attribute with the Os Information like it is written in the summarry.&lt;br /&gt;
&lt;p /&gt;
and another thing is it possible to enter value of custom attributes in the Customization specification?</description>
      <pubDate>Tue, 03 Nov 2009 09:10:41 GMT</pubDate>
      <author>shatztal</author>
      <guid>http://communities.vmware.com/thread/240380</guid>
      <dc:date>2009-11-03T09:10:41Z</dc:date>
      <clearspace:dateToText>2 weeks, 5 days ago</clearspace:dateToText>
      <clearspace:messageCount>14</clearspace:messageCount>
      <clearspace:replyCount>13</clearspace:replyCount>
    </item>
    <item>
      <title>VM expiration script - Automation problem</title>
      <link>http://communities.vmware.com/thread/237296</link>
      <description>&lt;br /&gt;
Good day fellows,&lt;br /&gt;
&lt;p /&gt;
I am seeking your assistance in troubleshooting the attached script.  This what i'm trying to accomplish:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Get created time for the VM in order to see how many days the VM has been in production to-date&lt;/li&gt;
&lt;li&gt;Send an email to the business owner if the VM has been deployed for more than a year based on information from Custom Fields. The server (s) Business Owners (BO) are contacted only if the server has been deployed over 365 days AND if they have not been contacted (see Custom Field below, with a value of either "Yes" or "No)&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Information on the Custom Fields:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Application&lt;/li&gt;
&lt;li&gt;Contacted&lt;/li&gt;
&lt;li&gt;Decommission_date&lt;/li&gt;
&lt;li&gt;Business_Owner&lt;/li&gt;
&lt;li&gt;BO_email&lt;/li&gt;
&lt;li&gt;Business_Owner2&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Issue:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Unable to retrieve the value of the "Contacted' CustomField.  Though i know how to query the value, i cant get it to compare against another string&lt;/li&gt;
&lt;li&gt;Same as above except that's for the email address value&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
I've attached the script i've been working on for your review.  Your assistance on this will greatly appreciated!!</description>
      <pubDate>Fri, 16 Oct 2009 22:45:30 GMT</pubDate>
      <author>herreraj</author>
      <guid>http://communities.vmware.com/thread/237296</guid>
      <dc:date>2009-10-16T22:45:30Z</dc:date>
      <clearspace:dateToText>2 weeks, 5 days ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>Is It possible to run a Customscript after a Machine is Created?</title>
      <link>http://communities.vmware.com/thread/240377</link>
      <description>&lt;br /&gt;
We Deploy From Templates lots of vm's . and i wrote a VI Powershell Script that is adding some Details to the VM that in the VI client we can see like "Description" "Owner" "Domain"&lt;br /&gt;
it is for Order Purpose only .&lt;br /&gt;
i want that after i Deploy a Machine it will run the script on my Guest PC so that i can input the details as it says.&lt;br /&gt;
is it possible ? have you any idea maybe on an other way? &lt;br /&gt;
&lt;p /&gt;
 Edited:&lt;br /&gt;
&lt;p /&gt;
  have created in vShpere CLI a script that is ps1 extended.&lt;br /&gt;
&lt;p /&gt;
i want it to run after the Sysprep finishes when the user logons to the computer but just one.&lt;br /&gt;
&lt;p /&gt;
in the Customization Wizard we can put in thing for "Run Once" &lt;br /&gt;
&lt;p /&gt;
hwo can i put in a script like that? don't forget that is not a Powersheel script it is the VM powershell so it is more diffecult to run the script automatic.&lt;br /&gt;
&lt;p /&gt;
the only ways is from direct vShpere cli Shell but i want to make it automatic withour user interupts.&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;</description>
      <pubDate>Tue, 03 Nov 2009 08:38:37 GMT</pubDate>
      <author>shatztal</author>
      <guid>http://communities.vmware.com/thread/240377</guid>
      <dc:date>2009-11-03T08:38:37Z</dc:date>
      <clearspace:dateToText>2 weeks, 5 days ago</clearspace:dateToText>
      <clearspace:messageCount>4</clearspace:messageCount>
      <clearspace:replyCount>3</clearspace:replyCount>
    </item>
    <item>
      <title>How to do get-vm with parameters like (owner, Serv-description , etc)</title>
      <link>http://communities.vmware.com/thread/239186</link>
      <description>&lt;br /&gt;
Hey i want to get an output of all the VMs in the Inventory but i need it to with some parameters like :&lt;br /&gt;
&lt;p /&gt;
Name&lt;br /&gt;
&lt;p /&gt;
Owner&lt;br /&gt;
&lt;p /&gt;
Noted&lt;br /&gt;
&lt;p /&gt;
Server Description&lt;br /&gt;
&lt;p /&gt;
Valid Until&lt;br /&gt;
&lt;p /&gt;
how do i do it ?&lt;br /&gt;
&lt;p /&gt;
i know that with get-vm i can get all virtual machines but i need some parameters like -OWNER or somthing like that to get all of them.&lt;br /&gt;
&lt;p /&gt;
i need the output to an Excel File.&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">get-vm;</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powershell</category>
      <pubDate>Wed, 28 Oct 2009 13:02:47 GMT</pubDate>
      <author>shatztal</author>
      <guid>http://communities.vmware.com/thread/239186</guid>
      <dc:date>2009-10-28T13:02:47Z</dc:date>
      <clearspace:dateToText>2 weeks, 5 days ago</clearspace:dateToText>
      <clearspace:messageCount>23</clearspace:messageCount>
      <clearspace:replyCount>22</clearspace:replyCount>
    </item>
    <item>
      <title>Script for creating VM's and powering on</title>
      <link>http://communities.vmware.com/thread/240440</link>
      <description>&lt;br /&gt;
I have written few commands below on setting up a new virtual machine on a specfic vmhost and then attaching iso image to the cd drive and then powering on VM.  But I wanted to find out how I can combine all these commands into a function, then run the function by giving a parameter which is the virtual machine and also maybe the iso image.&lt;br /&gt;
&lt;p /&gt;
The command for creating a VM on a specific host I used was :&lt;br /&gt;
&lt;p /&gt;
 get-vmhost 'VMhost' | new-vm -name 'name -datastore (get-datastore 'datastore)  -diskmb ( 8GB / 1MB ) -memoryMB ( 1gb / 1mb )&lt;br /&gt;
&lt;p /&gt;
 get-vm 'name' | new-cddrive -isopath $isopath -startconnected&lt;br /&gt;
&lt;p /&gt;
Start-VM 'name'&lt;br /&gt;
&lt;p /&gt;
How can you combine the above in a script by applying parameters such as name and iso path (if that is possible).&lt;br /&gt;
&lt;p /&gt;
Any advise, or is there is downloadable script for creating VM's</description>
      <pubDate>Tue, 03 Nov 2009 15:03:54 GMT</pubDate>
      <author>Guv</author>
      <guid>http://communities.vmware.com/thread/240440</guid>
      <dc:date>2009-11-03T15:03:54Z</dc:date>
      <clearspace:dateToText>2 weeks, 6 days ago</clearspace:dateToText>
      <clearspace:messageCount>2</clearspace:messageCount>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>Snapshot question</title>
      <link>http://communities.vmware.com/thread/240415</link>
      <description>&lt;br /&gt;
Hello Everyone&lt;br /&gt;
&lt;p /&gt;
 Quick question. What is the difference between: "get-snapshot | remove snapshot " and "remove-snapshot" cmdlets? Basically I clone some VMs over to our DR site, and sometimes even thought the clone works OK, a temporary clone snapshot gets left on the original VM and I have to go in and delete it.&lt;br /&gt;
&lt;p /&gt;
 Thanks a lot.</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">snapshots</category>
      <pubDate>Tue, 03 Nov 2009 12:57:13 GMT</pubDate>
      <author>gwagchunks</author>
      <guid>http://communities.vmware.com/thread/240415</guid>
      <dc:date>2009-11-03T12:57:13Z</dc:date>
      <clearspace:dateToText>2 weeks, 6 days ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>New-VM powered on Script</title>
      <link>http://communities.vmware.com/thread/240402</link>
      <description>&lt;br /&gt;
I am looking for a script to setup a new VM but within the new vm have the cd connected to an iso image on a datastore and then powered on and boot from CD which will start the installation of the guest.&lt;br /&gt;
&lt;p /&gt;
 I can use the new-vm to setup a VM with cpu, memory parameters and what datastore, and also setup a variable for the iso destination, but within the new-vm command how can i get the cd connected and then powered on and boot from CD.  Is there a script I can run.&lt;br /&gt;
&lt;p /&gt;
Can anyone advise please.</description>
      <pubDate>Tue, 03 Nov 2009 12:30:03 GMT</pubDate>
      <author>Guv</author>
      <guid>http://communities.vmware.com/thread/240402</guid>
      <dc:date>2009-11-03T12:30:03Z</dc:date>
      <clearspace:dateToText>2 weeks, 6 days ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>Report on VM Guests</title>
      <link>http://communities.vmware.com/thread/240392</link>
      <description>&lt;br /&gt;
I have been practicising powershell for a while now and have given my first task now.  Because of licensing I have a to produce a report on all virtual machines in  our virtual centre and what operating system they are running and if they are powered on.  Then have to do a count on each OS type and present this all in a report.&lt;br /&gt;
&lt;p /&gt;
The script I have written so far is:&lt;br /&gt;
&lt;p /&gt;
 $VMGuest = @{ N = "Operating System" ; E = { (get-vmguest -VM $_).osfullname} }&lt;br /&gt;
&lt;p /&gt;
get -vm | select-object name, $vmguest, powerstate | export-csv c:\scripts\guestreport.csv&lt;br /&gt;
&lt;p /&gt;
My first question is this the best way to get a list of VM's and their guest OS, or is there better code or script to do this.  Also regarding report format I used the export-csv instead od coverto-html, as the html report looked a bit dull.  Is export-csv the best report format.&lt;br /&gt;
&lt;p /&gt;
My next question is a key question and is how do you get a count of the OS and present that in the report and how would you combine this with the above script.  Would you need to run a separate command to do this.  I have looked at the measure-object but dont know how i would use this.&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Any advise on the above questions</description>
      <pubDate>Tue, 03 Nov 2009 09:42:19 GMT</pubDate>
      <author>Guv</author>
      <guid>http://communities.vmware.com/thread/240392</guid>
      <dc:date>2009-11-03T09:42:19Z</dc:date>
      <clearspace:dateToText>2 weeks, 6 days ago</clearspace:dateToText>
      <clearspace:messageCount>2</clearspace:messageCount>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>Does Powercli support powershell v2 on XP?</title>
      <link>http://communities.vmware.com/thread/240382</link>
      <description>&lt;br /&gt;
Hey guys I noticed MS have released the PS 2.0 (Windows management framework )   &lt;a class="jive-link-external" href="http://support.microsoft.com/kb/968929"&gt;http://support.microsoft.com/kb/968929&lt;/a&gt;  for XP.   I would like to upgrade but I will hold off if Powercli does not support it...&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
So does powercli still work?  Has anyone upgraded their desktops yet??&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Cheers&lt;br /&gt;
&lt;p /&gt;
Packetboy.</description>
      <pubDate>Tue, 03 Nov 2009 09:43:25 GMT</pubDate>
      <author>packetboy</author>
      <guid>http://communities.vmware.com/thread/240382</guid>
      <dc:date>2009-11-03T09:43:25Z</dc:date>
      <clearspace:dateToText>2 weeks, 6 days ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>ComputeResource</title>
      <link>http://communities.vmware.com/thread/240254</link>
      <description>&lt;br /&gt;
Does anyone know how to pull a ComputeResource Managed Object Reference from the API?  For some reason I can't seem to pull it using Get-View.  &lt;br /&gt;
&lt;p /&gt;
 I"m trying to map a host object to its default resourcepool.  It doesn't appear that I can do this using the get-resourcepool cmdlet either.&lt;br /&gt;
&lt;p /&gt;
 Thanks for any help you can provide.</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powershell</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">computeresource</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">resourcepool</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">hosts</category>
      <pubDate>Mon, 02 Nov 2009 19:48:30 GMT</pubDate>
      <author>Fisk</author>
      <guid>http://communities.vmware.com/thread/240254</guid>
      <dc:date>2009-11-02T19:48:30Z</dc:date>
      <clearspace:dateToText>3 weeks, 3 hours ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Clone VM using PowerCLi script</title>
      <link>http://communities.vmware.com/thread/239666</link>
      <description>Hi All,&lt;br /&gt;
&lt;br /&gt;
I am trying to develop simple script to clone VM using PowerCLi, I wrote the below script for the same. But when I execute it I get this error, I couldn't get whats wrong by looking at the error. can some one help me here?&lt;br /&gt;
I tried running this script with connecting to both Virtual Center 2.5.0 and ESX 3.5 but no luck.&lt;br /&gt;
&lt;br /&gt;
I get this error when I tried script with ESX server.&lt;br /&gt;
&lt;br /&gt;
Exception calling "CloneVM_Task" with "3" argument(s): "The operation is not su&lt;br /&gt;
pported on the object."&lt;br /&gt;
At D:\Automation\PowerShell\samp.ps1:25 char:61&lt;br /&gt;
+   $clntask = (Get-View (Get-VM -Name $vm2c).ID).CloneVM_Task &amp;lt;&amp;lt;&amp;lt;&amp;lt; ($targetfol&lt;br /&gt;
der.moref, $destcln, $VMCloneSpec)&lt;br /&gt;
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException&lt;br /&gt;
    + FullyQualifiedErrorId : DotNetMethodException&lt;br /&gt;
&lt;br /&gt;
And when I try with Virtual Center,&lt;br /&gt;
&lt;br /&gt;
Exception calling "CloneVM_Task" with "3" argument(s): "folder"&lt;br /&gt;
At D:\Automation\PowerShell\samp.ps1:25 char:61&lt;br /&gt;
+   $clntask = (Get-View (Get-VM -Name $vm2c).ID).CloneVM_Task &amp;lt;&amp;lt;&amp;lt;&amp;lt; ($targetfol&lt;br /&gt;
der.moref, $destcln, $VMCloneSpec)&lt;br /&gt;
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException&lt;br /&gt;
    + FullyQualifiedErrorId : DotNetMethodException&lt;br /&gt;
&lt;p /&gt;
Script looks like this, I am not providing any Datastore or Resourcepool etc. I hope that should be okay.&lt;br /&gt;
&lt;br /&gt;
#==============================================================&lt;br /&gt;
Add-PSSnapin VMware.VimAutomation.Core&lt;br /&gt;
&lt;br /&gt;
  $vm2c = "TESTVM002" 			#Name of the virtual to be cloned.&lt;br /&gt;
  $destcln = "TESTVM002_1" 		#Name of the clone to be made.&lt;br /&gt;
  $server = "x.1x.xx.xx" 		#Name of the host or vitrual cener server.&lt;br /&gt;
&lt;p /&gt;
  $foldername = "vm"	#Name of the destinaion folder for the clone.&lt;br /&gt;
  $resourcepool = "TEST-RES" 	#Name of the destination Resource Pool for the clone.&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;br /&gt;
  $serv = Connect-VIServer -Server $server -Protocol "https" -User "Administrator" -Password "pwd"&lt;br /&gt;
&lt;p /&gt;
  $targetfolder = Get-Folder -Server $serv -Name vm | % {Get-View $_.ID}&lt;br /&gt;
  $VMCloneSpec = New-Object VMware.Vim.VirtualMachineCloneSpec&lt;br /&gt;
  $VMCloneSpec.Location = New-Object VMware.Vim.VirtualMachineRelocateSpec&lt;br /&gt;
  $VMCloneSpec.powerOn = $false&lt;br /&gt;
  $VMCloneSpec.template = $false&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
  $clntask = (Get-View (Get-VM -Name $vm2c).ID).CloneVM_Task($targetfolder.moref, $destcln, $VMCloneSpec)&lt;br /&gt;
#======================================================================</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powercli</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">for</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">clone</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vm</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">automation</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powercli</category>
      <pubDate>Fri, 30 Oct 2009 02:46:35 GMT</pubDate>
      <author>anandv</author>
      <guid>http://communities.vmware.com/thread/239666</guid>
      <dc:date>2009-10-30T02:46:35Z</dc:date>
      <clearspace:dateToText>3 weeks, 6 hours ago</clearspace:dateToText>
      <clearspace:messageCount>4</clearspace:messageCount>
      <clearspace:replyCount>3</clearspace:replyCount>
    </item>
    <item>
      <title>move only one disk per storage vmotion</title>
      <link>http://communities.vmware.com/thread/215763</link>
      <description>&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
we have currently the problem that we have to move only one disk with Storage Vmotion. I've found the commandlet "move-VM" for this, but I didn't find any option to move only one vmdk and not  the whole VM?&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Can anybody help me.&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Thanks, &lt;br /&gt;
&lt;p /&gt;
Christian</description>
      <pubDate>Mon, 15 Jun 2009 15:24:55 GMT</pubDate>
      <author>ChrisRu</author>
      <guid>http://communities.vmware.com/thread/215763</guid>
      <dc:date>2009-06-15T15:24:55Z</dc:date>
      <clearspace:dateToText>3 weeks, 6 hours ago</clearspace:dateToText>
      <clearspace:messageCount>18</clearspace:messageCount>
      <clearspace:replyCount>17</clearspace:replyCount>
    </item>
    <item>
      <title>Filter command in powershell</title>
      <link>http://communities.vmware.com/thread/240201</link>
      <description>&lt;br /&gt;
I have quick question on the filter command.  I am trying to understand how it is used.&lt;br /&gt;
&lt;p /&gt;
I have seen used in the script below for the get-scsilun cmdlet, as seen below:&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Filter get-scsilun { $_ | get-vmhoststorage | select-object -expandproperty filesystemvolumeinfo}&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Once I run the command, I can use the get-scsilun differently now to get a name of a lun, like below:&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
$iscsilun = get-vmhost | get-scsilun | where-object { $_.name -eq "name of LUN"}&lt;br /&gt;
&lt;p /&gt;
$iscsilun | fl&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
But my question how is the filter command used to change the way get-scsilun is used.  Any one has any ideas and examples.  Before the example the get-scsilun could not be used to get the name of the LUN.</description>
      <pubDate>Mon, 02 Nov 2009 16:35:38 GMT</pubDate>
      <author>Guv</author>
      <guid>http://communities.vmware.com/thread/240201</guid>
      <dc:date>2009-11-02T16:35:38Z</dc:date>
      <clearspace:dateToText>3 weeks, 8 hours ago</clearspace:dateToText>
      <clearspace:messageCount>2</clearspace:messageCount>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>ESX/ESXi Host CPU and Memory usage and export to CSV</title>
      <link>http://communities.vmware.com/thread/223151</link>
      <description>&lt;br /&gt;
Hi all,&lt;br /&gt;
&lt;p /&gt;
I'm looking to get the total amount of CPU and Memory being utilized by all the ESX/ESXi hosts in our environment.  The script below exports to csv the host name, CPU cores, total CPU and total Memory but I just need to know how to get the CPU and Memory utilization.  Any help would be appreciated!&lt;br /&gt;
&lt;p /&gt;
$vcserver="xxxxx" &lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
connect-VIServer $vcserver &lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
#Setting Variables&lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
Write-Host "Setting Variables...Please wait"&lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
$VMs = &lt;b&gt;Get-VM&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
$VMHs = &lt;b&gt;Get-VMHost&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;ol&gt;
&lt;li&gt;Send VM Host Information to Document #&lt;/li&gt;
&lt;/ol&gt;
&lt;p /&gt;
$report = @()&lt;br /&gt;
&lt;p /&gt;
ForEach ($vmh in $vmhs)&lt;br /&gt;
&lt;p /&gt;
{&lt;br /&gt;
&lt;p /&gt;
$hosts = &lt;b&gt;Get-VMHost&lt;/b&gt; $vmh.Name | *%*{*Get-View* $_.ID}&lt;br /&gt;
&lt;p /&gt;
$row = "" | &lt;b&gt;select-Object&lt;/b&gt; Name, NumCpuCores, Hz, Memory&lt;br /&gt;
&lt;p /&gt;
$row.Name = $hosts.Name&lt;br /&gt;
&lt;p /&gt;
$row.NumCpuCores = $hosts.Hardware.CpuInfo.NumCpuCores&lt;br /&gt;
&lt;p /&gt;
$row.Hz = &lt;a class="jive-link-adddocument" href="http://communities.vmware.com/community-document-picker.jspa?communityID=&amp;subject=math"&gt;math&lt;/a&gt;::round(($hosts.Hardware.CpuInfo.Hz)/10000, 0)&lt;br /&gt;
&lt;p /&gt;
$row.Memory = &lt;a class="jive-link-adddocument" href="http://communities.vmware.com/community-document-picker.jspa?communityID=&amp;subject=math"&gt;math&lt;/a&gt;::round(($hosts.Hardware.MemorySize)/1024, 0)&lt;br /&gt;
&lt;p /&gt;
$report += $row&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
}&lt;br /&gt;
&lt;p /&gt;
$report | &lt;b&gt;Export-Csv&lt;/b&gt; "c:\VMwareExport_HostReport.csv" &lt;i&gt;-noTypeInformation&lt;/i&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;ol&gt;
&lt;li&gt;Disconnect session from VC #&lt;/li&gt;
&lt;/ol&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;br /&gt;
*&lt;br /&gt;
disconnect-viserver &lt;i&gt;-confirm&lt;/i&gt;:$false&lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
exit</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">automation</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">cmdlet</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">esx</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">esxi</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">get-vmhost</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">get-vm</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powershell</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">report</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">reporting</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">script</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">toolkit</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vi</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vi_toolkit_windows</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vitoolkit</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vmware</category>
      <pubDate>Mon, 27 Jul 2009 23:39:55 GMT</pubDate>
      <author>kaizenwerks</author>
      <guid>http://communities.vmware.com/thread/223151</guid>
      <dc:date>2009-07-27T23:39:55Z</dc:date>
      <clearspace:dateToText>3 weeks, 8 hours ago</clearspace:dateToText>
      <clearspace:messageCount>4</clearspace:messageCount>
      <clearspace:replyCount>3</clearspace:replyCount>
    </item>
    <item>
      <title>import permissions into vsphere</title>
      <link>http://communities.vmware.com/thread/240229</link>
      <description>Is there a way that i can export all permissions on VM's  from vcenter 2.5 (esx 3.5)  to new vSphere vcenter?  since we have more than 500 VM's its difficult to configure for every Virtual machine</description>
      <pubDate>Mon, 02 Nov 2009 17:27:40 GMT</pubDate>
      <author>storagevmotion</author>
      <guid>http://communities.vmware.com/thread/240229</guid>
      <dc:date>2009-11-02T17:27:40Z</dc:date>
      <clearspace:dateToText>3 weeks, 8 hours ago</clearspace:dateToText>
      <clearspace:messageCount>2</clearspace:messageCount>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>Iscsi multipathing</title>
      <link>http://communities.vmware.com/thread/236921</link>
      <description>I'm following the VMware iSCSI SAN Configuration Guide to configure Iscsi multi-pathing and I come to a part where it says to use CLI to send this command "esxcli swiscsi nic add -n &amp;lt;port_name&amp;gt; -d &amp;lt;vmhba&amp;gt;". I have CLI setup and I'm connected to the host. When I enter the command listed above I get "The term 'esxcli' is not recognized as the name of a cmdlet.........". It's frustrating because the document assumes that I'm a CLI expert but I'm really a beginner. I'd need more step by step details of how to configure this in CLI. Any help you be very appreciated. Thanks</description>
      <pubDate>Thu, 15 Oct 2009 12:46:26 GMT</pubDate>
      <author>Rob Lisi</author>
      <guid>http://communities.vmware.com/thread/236921</guid>
      <dc:date>2009-10-15T12:46:26Z</dc:date>
      <clearspace:dateToText>3 weeks, 9 hours ago</clearspace:dateToText>
      <clearspace:messageCount>8</clearspace:messageCount>
      <clearspace:replyCount>7</clearspace:replyCount>
    </item>
    <item>
      <title>How to Install PowerCLI on a drive other than C:</title>
      <link>http://communities.vmware.com/thread/236773</link>
      <description>I wish to have PowerCLI on a Windows x64 server on a drive other than the system drive (C:). Space management on the server's system drive is always a problem, so our policy is to install as much on another drive, in our case F: or R: which have plenty of room.  The installer does not seem to give that option.  Can I do it by copying extracted files to a folder, registering some DLLs and possible setting some registry keys?</description>
      <pubDate>Wed, 14 Oct 2009 16:26:55 GMT</pubDate>
      <author>sullom</author>
      <guid>http://communities.vmware.com/thread/236773</guid>
      <dc:date>2009-10-14T16:26:55Z</dc:date>
      <clearspace:dateToText>3 weeks, 9 hours ago</clearspace:dateToText>
      <clearspace:messageCount>13</clearspace:messageCount>
      <clearspace:replyCount>12</clearspace:replyCount>
    </item>
    <item>
      <title>Select or select-object</title>
      <link>http://communities.vmware.com/thread/240203</link>
      <description>&lt;br /&gt;
I am trying to find out the difference in using select and select-object command in powershell commands, as I have seen it used in different commands but seem to get the same result, and want to find out when should each command be used.&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Such as the below command:&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Get-vm | select name&lt;br /&gt;
&lt;p /&gt;
Get-vm | select-object name&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;br /&gt;
Whats the difference in using each of select command.  Any advise on this</description>
      <pubDate>Mon, 02 Nov 2009 16:37:33 GMT</pubDate>
      <author>Guv</author>
      <guid>http://communities.vmware.com/thread/240203</guid>
      <dc:date>2009-11-02T16:37:33Z</dc:date>
      <clearspace:dateToText>3 weeks, 9 hours ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>scheduled tasks + credentials not passed to script</title>
      <link>http://communities.vmware.com/thread/192580</link>
      <description>I opened another thread, because if accidentaly set the other thread to solved.&lt;br /&gt;
&lt;br /&gt;
I am still having issues with scheduled tasks and credentials. I created a new lab (on my laptop) to test the issue.&lt;br /&gt;
But still i am having issues, i keep on getting this error:&lt;br /&gt;
&lt;p /&gt;
Connect-VIServer : C:\WINDOWS\system32\windowspowershell\v1.0\%APPDATA%\VMware\&lt;br /&gt;
credstore&lt;br /&gt;
&lt;p /&gt;
When i installed the previous version everything works oke. When i hard code the username and password in the script, it works oke&lt;br /&gt;
&lt;p /&gt;
Who has the answer to my problem, i can't seem to find the problem. &lt;br /&gt;
&lt;p /&gt;
.</description>
      <pubDate>Wed, 04 Feb 2009 16:51:54 GMT</pubDate>
      <author>RobMokkink</author>
      <guid>http://communities.vmware.com/thread/192580</guid>
      <dc:date>2009-02-04T16:51:54Z</dc:date>
      <clearspace:dateToText>3 weeks, 10 hours ago</clearspace:dateToText>
      <clearspace:messageCount>24</clearspace:messageCount>
      <clearspace:replyCount>23</clearspace:replyCount>
    </item>
    <item>
      <title>relocate vm's from csv file and create schedule task in VC</title>
      <link>http://communities.vmware.com/thread/236684</link>
      <description>&lt;br /&gt;
What is wrong with the last line "$scheduledTaskManager.CreateScheduledTask($vmView.MoRef, $task) " ?&lt;br /&gt;
&lt;p /&gt;
&lt;ol&gt;
&lt;li&gt;The ScheduledTaskManager is in the Service Instance.&lt;/li&gt;
&lt;/ol&gt;
&lt;p /&gt;
$si = &lt;b&gt;get-view&lt;/b&gt; ServiceInstance&lt;br /&gt;
&lt;p /&gt;
$scheduledTaskManager = &lt;b&gt;Get-View&lt;/b&gt; $si.Content.ScheduledTaskManager&lt;br /&gt;
&lt;p /&gt;
&lt;ol&gt;
&lt;li&gt;We need to identify the VM and the host where it will be powered on.&lt;/li&gt;
&lt;/ol&gt;
&lt;p /&gt;
#$vmView = Get-VM PowerOnTest | Get-View&lt;br /&gt;
&lt;p /&gt;
#$esxView = Get-VMHost esx35-01.vitoolkit.local | Get-View&lt;br /&gt;
&lt;p /&gt;
foreach ($f in (*import-csv* &lt;b&gt;`&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
"D:\MigrateStorage\amsterdam-core-hp-poweron.csv")) &lt;br /&gt;
&lt;p /&gt;
{&lt;br /&gt;
&lt;p /&gt;
$vmView=$f&lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
echo $vmView&lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;p /&gt;
&lt;ol&gt;
&lt;li&gt;Now we construct the task argument.&lt;/li&gt;
&lt;/ol&gt;
&lt;p /&gt;
$arg = &lt;b&gt;New-Object&lt;/b&gt; VMware.Vim.MethodActionArgument&lt;br /&gt;
&lt;p /&gt;
#$arg.Value = $esxview.MoRef&lt;br /&gt;
&lt;p /&gt;
$action = &lt;b&gt;New-Object&lt;/b&gt; VMware.Vim.MethodAction&lt;br /&gt;
&lt;p /&gt;
$action.Argument = $arg&lt;br /&gt;
&lt;p /&gt;
$action.Name = "PowerOnVM_Task"&lt;br /&gt;
&lt;p /&gt;
$scheduler = &lt;b&gt;new-object&lt;/b&gt; VMware.Vim.OnceTaskScheduler&lt;br /&gt;
&lt;p /&gt;
$scheduler.runat = (*get-date*).addminutes(5)&lt;br /&gt;
&lt;p /&gt;
$task = &lt;b&gt;New-Object&lt;/b&gt; VMware.Vim.ScheduledTaskSpec&lt;br /&gt;
&lt;p /&gt;
$task.Action = $action&lt;br /&gt;
&lt;p /&gt;
$task.Description = "Start a VM with a scheduled task."&lt;br /&gt;
&lt;p /&gt;
$task.Enabled = $true&lt;br /&gt;
&lt;p /&gt;
$task.Name = "Power On Virtual Machine"&lt;br /&gt;
&lt;p /&gt;
$task.Scheduler = $scheduler&lt;br /&gt;
&lt;p /&gt;
$scheduledTaskManager.CreateScheduledTask($vmView.MoRef, $task)</description>
      <pubDate>Wed, 14 Oct 2009 10:13:32 GMT</pubDate>
      <author>meistermn</author>
      <guid>http://communities.vmware.com/thread/236684</guid>
      <dc:date>2009-10-14T10:13:32Z</dc:date>
      <clearspace:dateToText>3 weeks, 13 hours ago</clearspace:dateToText>
      <clearspace:messageCount>24</clearspace:messageCount>
      <clearspace:replyCount>23</clearspace:replyCount>
    </item>
    <item>
      <title>Find vmdk per script</title>
      <link>http://communities.vmware.com/thread/240141</link>
      <description>&lt;br /&gt;
I have following situation:&lt;br /&gt;
&lt;p /&gt;
after I kill a vm and unregister it, the vm is not anymore in his vm folder on the datastore.&lt;br /&gt;
&lt;p /&gt;
Is it possible to search, if the vmdk'S are any else where ?</description>
      <pubDate>Mon, 02 Nov 2009 11:53:09 GMT</pubDate>
      <author>meistermn</author>
      <guid>http://communities.vmware.com/thread/240141</guid>
      <dc:date>2009-11-02T11:53:09Z</dc:date>
      <clearspace:dateToText>3 weeks, 14 hours ago</clearspace:dateToText>
      <clearspace:messageCount>2</clearspace:messageCount>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>script to find the changes done in infrastrcuture for a period of time</title>
      <link>http://communities.vmware.com/thread/240023</link>
      <description>&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;p /&gt;
Just curious to know, is there a way to find the changes done in the VC for a certain period of time. &lt;br /&gt;
&lt;p /&gt;
No ideas on how to start. Any help would be great &lt;img class="jive-emoticon" border="0" src="http://communities.vmware.com/images/emoticons/happy.gif" alt=":)" /&gt;</description>
      <pubDate>Sun, 01 Nov 2009 07:33:03 GMT</pubDate>
      <author>Rajeev S</author>
      <guid>http://communities.vmware.com/thread/240023</guid>
      <dc:date>2009-11-01T07:33:03Z</dc:date>
      <clearspace:dateToText>3 weeks, 1 day ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>list disks rdm with powershell</title>
      <link>http://communities.vmware.com/thread/171214</link>
      <description>&lt;br /&gt;
Hello , &lt;br /&gt;
&lt;p /&gt;
i like how lists disk rdm of a vm .Command get-hardisk give me location vmdk , capacity , but i want more informatation disks RDMs&lt;br /&gt;
&lt;p /&gt;
 Por example , i want to list imformation like vmhba 1:0:9:0 , SCSI (2:1) , etc  for each disk .  &lt;br /&gt;
&lt;p /&gt;
Someone can gime some help&lt;br /&gt;
&lt;p /&gt;
Thanks</description>
      <pubDate>Mon, 29 Sep 2008 07:17:00 GMT</pubDate>
      <author>Josito</author>
      <guid>http://communities.vmware.com/thread/171214</guid>
      <dc:date>2008-09-29T07:17:00Z</dc:date>
      <clearspace:dateToText>3 weeks, 2 days ago</clearspace:dateToText>
      <clearspace:messageCount>18</clearspace:messageCount>
      <clearspace:replyCount>17</clearspace:replyCount>
    </item>
    <item>
      <title>Is it possible to create Alarms by using CLI?</title>
      <link>http://communities.vmware.com/thread/239298</link>
      <description>&lt;br /&gt;
Hello: &lt;br /&gt;
&lt;p /&gt;
 I am wondering if it's possible to create Alarms (with specific settings) on VC by using commands (script) thorugh CLI. Is it possible? Is there any examples? &lt;br /&gt;
&lt;p /&gt;
I know it's very easy to create alarms (with specific settings) manually, but I want to distribute the script and create the same alarms (maybe delete all existing alarms before) on all my VCs very quick. &lt;br /&gt;
&lt;p /&gt;
Please let me know if you have any ideas where should I start. &lt;br /&gt;
&lt;p /&gt;
Best regards, &lt;br /&gt;
&lt;p /&gt;
Olegarr</description>
      <pubDate>Wed, 28 Oct 2009 20:15:50 GMT</pubDate>
      <author>olegarr</author>
      <guid>http://communities.vmware.com/thread/239298</guid>
      <dc:date>2009-10-28T20:15:50Z</dc:date>
      <clearspace:dateToText>3 weeks, 3 days ago</clearspace:dateToText>
      <clearspace:messageCount>7</clearspace:messageCount>
      <clearspace:replyCount>6</clearspace:replyCount>
    </item>
  </channel>
</rss>

