<?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 : Unanswered Threads - Automation Tools</title>
    <link>http://communities.vmware.com/community/vmtn/vsphere/automationtools?view=discussions&amp;filter=open</link>
    <description>Unanswered Discussion Threads in Automation Tools</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>15 hours, 8 minutes ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </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, 12 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, 17 hours ago</clearspace:dateToText>
      <clearspace:messageCount>4</clearspace:messageCount>
      <clearspace:replyCount>3</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>6 days, 23 hours ago</clearspace:dateToText>
      <clearspace:messageCount>4</clearspace:messageCount>
      <clearspace:replyCount>3</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, 4 days ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</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>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>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>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, 3 days ago</clearspace:dateToText>
      <clearspace:messageCount>4</clearspace:messageCount>
      <clearspace:replyCount>3</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>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, 5 hours ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>execution policy for community extensions</title>
      <link>http://communities.vmware.com/thread/240130</link>
      <description>Do we have to set the PShell execution policy to unrestricted to import the toolKitextensions module? I get the following error when i try to import:&lt;br /&gt;
&lt;br /&gt;
File C:\Users\camph009\Downloads\vitoolkitextensions-60625\coreModule\viToolkitExtensions.psm1 cannot be loaded. The file C:\Users\camph009\Downloads\vitoolkitextensions-60625\coreModule\viToolkitExtensions.psm1 is not digitally signed. The script will not execute on the system. Please see "get-help about_signing" for more details..&lt;br /&gt;
At :line:1 char:13&lt;br /&gt;
+ Import-Module &amp;lt;&amp;lt;&amp;lt;&amp;lt;  C:\Users\camph009\Downloads\vitoolkitextensions-60625\coreModule\viToolkitExtensions.psm1#&lt;br /&gt;
&lt;br /&gt;
I'm currently set to remoteSigned</description>
      <pubDate>Mon, 02 Nov 2009 11:10:25 GMT</pubDate>
      <author>houghtp</author>
      <guid>http://communities.vmware.com/thread/240130</guid>
      <dc:date>2009-11-02T11:10:25Z</dc:date>
      <clearspace:dateToText>3 weeks, 9 hours ago</clearspace:dateToText>
      <clearspace:messageCount>2</clearspace:messageCount>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>View Connection state of local connected iso image</title>
      <link>http://communities.vmware.com/thread/239474</link>
      <description>Hello, I am not sure if this is the right place to post my question but I will give it a shot.&lt;br /&gt;
&lt;br /&gt;
I have created a powershell script that looks like this:&lt;br /&gt;
&lt;p /&gt;
$erroractionpreference = "Continue"&lt;br /&gt;
&lt;p /&gt;
$VIServer = "VC Server" &lt;br /&gt;
&lt;p /&gt;
$scriptRoot = Split-Path (Resolve-Path $myInvocation.MyCommand.Path)&lt;br /&gt;
&lt;p /&gt;
Start-Transcript -Path (join-path $scriptRoot Log.txt) -Append&lt;br /&gt;
&lt;p /&gt;
Add-PSSnapin -Name "VMware.VimAutomation.Core" &lt;br /&gt;
&lt;p /&gt;
Connect-VIServer $VIServer -User UserWithRightsOnVC -Password "PwForThatUser&lt;br /&gt;
&lt;p /&gt;
Get-VM | ForEach-Object {&lt;br /&gt;
&lt;p /&gt;
If ($_.CDDrives | ForEach-Object {$_.IsoPath}) {&lt;br /&gt;
&lt;p /&gt;
Write-Host "Unmount cd on vm $_"&lt;br /&gt;
&lt;p /&gt;
Get-CDDrive -VM $_ | Where-Object {$_.IsoPath} | Set-CDDrive -NoMedia -Confirm:$false | out-null&lt;br /&gt;
&lt;p /&gt;
}&lt;br /&gt;
&lt;p /&gt;
If ($_.Floppydrives | ForEach-Object {$_.FloppyImagePath}) {&lt;br /&gt;
&lt;p /&gt;
Write-Host "Unmount flp on vm $_"&lt;br /&gt;
&lt;p /&gt;
Get-FloppyDrive -VM $_ | Where-Object {$_.FloppyImagePath} | Set-FloppyDrive -NoMedia -Confirm:$false | out-null&lt;br /&gt;
&lt;p /&gt;
}&lt;br /&gt;
&lt;p /&gt;
}&lt;br /&gt;
&lt;p /&gt;
This worked fine until we upgrade to vSphere/ESXi4. Now if someone has connected an ISO from local disk I cannot view that information with the get-vm | get-cddrive output. Where is that info displayed? I cannot see anything under remote device or host device&lt;br /&gt;
&lt;p /&gt;
IsoPath : &lt;br /&gt;
HostDevice :&lt;br /&gt;
RemoteDevice :&lt;br /&gt;
ConnectionState : VMware.VimAutomation.Client20.ConnectInfoImpl&lt;br /&gt;
Id : VirtualMachine-vm-1631/3000&lt;br /&gt;
Name : CD/DVD Drive 1&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Can someone please point me in the right direction where to find the output for local attached iso?&lt;br /&gt;
&lt;p /&gt;
BR&lt;br /&gt;
&lt;p /&gt;
Henrik</description>
      <pubDate>Thu, 29 Oct 2009 13:52:14 GMT</pubDate>
      <author>henber</author>
      <guid>http://communities.vmware.com/thread/239474</guid>
      <dc:date>2009-10-29T13:52:14Z</dc:date>
      <clearspace:dateToText>3 weeks, 4 days ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>Can a vm bootstrap trigger an action?</title>
      <link>http://communities.vmware.com/thread/239438</link>
      <description>&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;p /&gt;
 I was wondering whether it's possible to setup an even handler kind of thing which would trigger an action/function whenver a vm is bootstraping. Not loading the OS, but bootstraping- the stage before OS loads.&lt;br /&gt;
&lt;p /&gt;
Time to time there are operations I need to perform which require to power down a vm, or all vms on a lun or on a host.  It's difficult to schedule a down time, since the vms are used by multiple teams. If the even handler thing was possible, I could just setup a script which would perform the desired action as soon as the user reboots (from within the OS). The end user won't notice anything (except some delay until the vm comes back online) and I get my tasks done. E.g. I need to redo a LUN, but can't vmotion some vms since they have snapshots. The task is not critical/urgent, so I would give it few weeks. After that there is a big chance all (or most) vms were rebooted and migrated somewhere else. &lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Any ideas?</description>
      <pubDate>Thu, 29 Oct 2009 10:05:49 GMT</pubDate>
      <author>Park3r</author>
      <guid>http://communities.vmware.com/thread/239438</guid>
      <dc:date>2009-10-29T10:05:49Z</dc:date>
      <clearspace:dateToText>3 weeks, 4 days ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>SEC_E_INVALID_HANDLE error in InitializeClient() while trying to do LoginBySSPI()</title>
      <link>http://communities.vmware.com/thread/239207</link>
      <description>I am trying to login to my VMware vSphere 4 server using the PowerCLI api.&lt;br /&gt;
&lt;br /&gt;
The purpose of the project is to automatically take snapshot of the virtual machines. However the purpose is accomplished. But before moving to production, we had to change from Login() to LoginBySSPI() for enabling integrated login.&lt;br /&gt;
&lt;p /&gt;
At this point, the problem arose. Whatever, I do it does not login, fromt he vmware forum i understood that the sspichallenge code should be sent again to be authenticated. When i do that it throws the SEC_E_INVALID_HANDLE error at the initializeClient() function.&lt;br /&gt;
&lt;p /&gt;
code snippet is as follows&lt;br /&gt;
&lt;p /&gt;
I get error in the InitializeClient() function when it is called the second time from the catch section,&lt;br /&gt;
&lt;p /&gt;
in the first call to InitializeClient(), i get the clientToken of byte 55&lt;br /&gt;
and then when i pass it to loginbysspi i get the sspichallenge exception, from which i get the base64token and again pass to the initializeclient() so that i can get the server token and eventually pass to the LoginbySSPI(), but this time it fails at &lt;br /&gt;
&lt;p /&gt;
&lt;span style="color:#ff0000"&gt;&lt;b&gt;if (ss != SEC_E_OK &amp;#38;&amp;#38; ss != SEC_I_CONTINUE_NEEDED)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;{&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;throw new Exception("InitializeSecurityContext() failed!!!");&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;}&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;with ss = -2146893055&lt;/b&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;below is the code.... &lt;br clear="all" /&gt; &lt;br clear="all" /&gt;	VimClient VMClient; &lt;br clear="all" /&gt;	SessionManager sm; &lt;br clear="all" /&gt;	private void button1_Click(object sender, EventArgs e) &lt;br clear="all" /&gt;	{ &lt;br clear="all" /&gt;	try &lt;br clear="all" /&gt;	{ &lt;br clear="all" /&gt;	VMClient = new VimClient(); &lt;br clear="all" /&gt;	VMClient.Connect("vmware", CommunicationProtocol.Https, 443);&lt;/blockquote&gt;
&lt;blockquote&gt;var tokenString = Convert.ToBase64String(net.sf.vitfordotnet.mo.Sessionmanager.getToken()); &lt;br clear="all" /&gt;	DoLogin(tokenString);&lt;/blockquote&gt;
&lt;blockquote&gt;sm = new SessionManager(VMClient, VMClient.ServiceContent.SessionManager); &lt;br clear="all" /&gt;	sm.LoginBySSPI(tokenString, null); &lt;br clear="all" /&gt;	} &lt;br clear="all" /&gt;	catch (VMware.Vim.VimException ex) &lt;br clear="all" /&gt;	{ &lt;br clear="all" /&gt;	var mf = ex.MethodFault; &lt;br clear="all" /&gt;	// There was a challenge (response)! &lt;br clear="all" /&gt;	if (mf is SSPIChallenge) &lt;br clear="all" /&gt;	{ &lt;br clear="all" /&gt;	var sc = (SSPIChallenge)mf; &lt;br clear="all" /&gt;	var st_b64 = sc.Base64Token; &lt;br clear="all" /&gt;	byte&lt;strike&gt;] st = null; &lt;br clear="all" /&gt; byte[&lt;/strike&gt; ct; &lt;br clear="all" /&gt; bool cc; &lt;br clear="all" /&gt;	st = Convert.FromBase64String(st_b64); &lt;br clear="all" /&gt;	// Complete the credentials acquisition, this time with &lt;br clear="all" /&gt;	// the second part of the package. &lt;br clear="all" /&gt;	var ch = new SSPIHelper(); &lt;br clear="all" /&gt;	ch.InitializeClient(out ct, st, out cc); &lt;br clear="all" /&gt;	var ct_b64 = Convert.ToBase64String(ct); &lt;br clear="all" /&gt;	DoLogin(ct_b64); &lt;br clear="all" /&gt;	} &lt;br clear="all" /&gt;	} &lt;br clear="all" /&gt;	NameValueCollection filter = new NameValueCollection(); &lt;br clear="all" /&gt;	filter.Add("name", "^" + "CG001876" + "$"); &lt;br clear="all" /&gt;	VirtualMachine vm = (VirtualMachine)VMClient.FindEntityView(typeof(VirtualMachine), null, filter, null); &lt;br clear="all" /&gt;	} &lt;br clear="all" /&gt;	public void DoLogin(string tokenStr) &lt;br clear="all" /&gt;	{ &lt;br clear="all" /&gt;	SessionManager sm = new SessionManager(VMClient, VMClient.ServiceContent.SessionManager); &lt;br clear="all" /&gt;	UserSession us = sm.LoginBySSPI(tokenStr, null); &lt;br clear="all" /&gt;	}&lt;/blockquote&gt;</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">loginbysspi</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">integrated</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">login</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">power</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">cli</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">automation</category>
      <pubDate>Wed, 28 Oct 2009 14:20:53 GMT</pubDate>
      <author>vinubaby</author>
      <guid>http://communities.vmware.com/thread/239207</guid>
      <dc:date>2009-10-28T14:20:53Z</dc:date>
      <clearspace:dateToText>3 weeks, 5 days ago</clearspace:dateToText>
      <clearspace:messageCount>8</clearspace:messageCount>
      <clearspace:replyCount>7</clearspace:replyCount>
    </item>
    <item>
      <title>Download Errors " Invalid Download Group "-  vCLI Download Problems</title>
      <link>http://communities.vmware.com/thread/238985</link>
      <description>Folks,&lt;br /&gt;
&lt;br /&gt;
We are having problems with our download site for vCLI 4.0. I have reported and escalated problems to our IT for resolution. Hoping this is resolved soon.&lt;br /&gt;
Thanks for your patience&lt;br /&gt;
&lt;br /&gt;
Pablo</description>
      <pubDate>Tue, 27 Oct 2009 20:06:03 GMT</pubDate>
      <author>heyitspablo</author>
      <guid>http://communities.vmware.com/thread/238985</guid>
      <dc:date>2009-10-27T20:06:03Z</dc:date>
      <clearspace:dateToText>3 weeks, 6 days ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>Checking VLAN's</title>
      <link>http://communities.vmware.com/thread/238878</link>
      <description>&lt;br /&gt;
Hi @ll:&lt;br /&gt;
&lt;p /&gt;
I need to check my ESX-Host if all physical networkcards &lt;b&gt;see&lt;/b&gt; all connected VLAN's for QS reasons. I know how to check the portroups but don't know if the VLAN's are really connected.&lt;br /&gt;
&lt;p /&gt;
Any help is appreciated.</description>
      <pubDate>Tue, 27 Oct 2009 13:23:07 GMT</pubDate>
      <author>matzoni1</author>
      <guid>http://communities.vmware.com/thread/238878</guid>
      <dc:date>2009-10-27T13:23:07Z</dc:date>
      <clearspace:dateToText>3 weeks, 5 days ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>4.0 Upgrade Automation Script Help - Virtual Machines</title>
      <link>http://communities.vmware.com/thread/238343</link>
      <description>&lt;br /&gt;
OK so here's what I'd like to do:&lt;br /&gt;
&lt;p /&gt;
1.) Schedule the migration of machines from a resource pool in a 3.5 cluster to a resource pool (with a different name) in a 4.0 cluster. Vmotion does work between them.&lt;br /&gt;
&lt;p /&gt;
2.) Also add these machines to a specific folder in the "VM's and Templates" view&lt;br /&gt;
&lt;p /&gt;
3.) Once migrated, scan &amp;#38; remediate the machines in the above specified folder against the VMWare Tools and Virtual Hardware upgrade baseline group I have attached to the folder&lt;br /&gt;
&lt;p /&gt;
I'd like to schedule this as an overnight process.  Any ideas?&lt;br /&gt;
&lt;br /&gt;</description>
      <pubDate>Fri, 23 Oct 2009 13:58:53 GMT</pubDate>
      <author>proden20</author>
      <guid>http://communities.vmware.com/thread/238343</guid>
      <dc:date>2009-10-23T13:58:53Z</dc:date>
      <clearspace:dateToText>4 weeks, 9 hours ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>switch to public nic</title>
      <link>http://communities.vmware.com/thread/238009</link>
      <description>&lt;br /&gt;
Hi, I am new to PowerCli. I need to write a script to switch VM's network from internal to public . Can anyone help me how to do this using PowerCLI cmdlet ?&lt;br /&gt;
&lt;p /&gt;
Thanks.</description>
      <pubDate>Wed, 21 Oct 2009 21:38:26 GMT</pubDate>
      <author>tkcoder</author>
      <guid>http://communities.vmware.com/thread/238009</guid>
      <dc:date>2009-10-21T21:38:26Z</dc:date>
      <clearspace:dateToText>1 month, 2 days ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>storage Motioning</title>
      <link>http://communities.vmware.com/thread/237955</link>
      <description>I know that VMware has stated that svmotion.pl does not support migrating vDisks on a single VM to different LUN locations in VirtualCenter2.5 or ESX3.5.    However, is this feature available in vSphere?  I have several VMs that contain multiple vDisks and each vDisk is located on separate FC LUNs for a reason.   But, when we do SAN maintenance and use svmotion to move the disks off the LUN being worked, it moves "all" the disks to the same location and will not allow me to return the disks to separate LUNs as they were originally configured.</description>
      <pubDate>Wed, 21 Oct 2009 19:08:21 GMT</pubDate>
      <author>pearlyshells</author>
      <guid>http://communities.vmware.com/thread/237955</guid>
      <dc:date>2009-10-21T19:08:21Z</dc:date>
      <clearspace:dateToText>1 month, 3 days ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>Clone VM to different datastore using PowerCLI?</title>
      <link>http://communities.vmware.com/thread/237052</link>
      <description>&lt;br /&gt;
Hello All,&lt;br /&gt;
&lt;p /&gt;
I am running VSphere and have a working script that clones a VM using powercli. I only see where you can specify a foldername, but not a specific datastore. Am I missing something or is it not possible to specify a new datastore uding cloneVM_Task?&lt;br /&gt;
&lt;p /&gt;
I would  like to clone vm's to different datastore, if possible.&lt;br /&gt;
&lt;p /&gt;
If not possible using cloneVM_Task, is there another method for moving VM's? I stumbled across moveDatastoreFile_Task, but not sure this is best method and I could not find much info on this.&lt;br /&gt;
&lt;p /&gt;
Thanks much! &lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;br /&gt;</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">clonevm_task</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">script</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">clone</category>
      <pubDate>Thu, 15 Oct 2009 20:47:26 GMT</pubDate>
      <author>LiamCurtis</author>
      <guid>http://communities.vmware.com/thread/237052</guid>
      <dc:date>2009-10-15T20:47:26Z</dc:date>
      <clearspace:dateToText>1 month, 1 week ago</clearspace:dateToText>
      <clearspace:messageCount>2</clearspace:messageCount>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>connect-viserver times out randomly</title>
      <link>http://communities.vmware.com/thread/236898</link>
      <description>Hi, &lt;br /&gt;
&lt;br /&gt;
I have a script that runs each night and randomly it seems to fail to connect (I know for a fact this isn't a network issue)&lt;br /&gt;
So I've put a condition to check if there is a connection, if not, attempt to connect again up to a maximum of five times. However this reaches the maximum and as a result the script doesn't work.&lt;br /&gt;
My questions are:&lt;br /&gt;
&lt;br /&gt;
Are there any blatant reasons why the script would fail to connect and is there anything obviously wrong with the reconnection attempts?&lt;br /&gt;
Thanks in advance.&lt;br /&gt;
&lt;br /&gt;
&lt;span class="jive-quote-header"&gt;Here a section of the code&lt;/span&gt;&lt;div class="jive-quote"&gt;
&lt;p /&gt;
$connect = connect-viserver $viServerName &lt;br /&gt;
&lt;br /&gt;
	If ($connect.IsConnected -ne $true)&lt;br /&gt;
		{&lt;br /&gt;
			while (($connect.IsConnected -ne $true) -and ($i -le 5))&lt;br /&gt;
			{&lt;br /&gt;
				sleep 15 &lt;br /&gt;
				$connect = connect-viserver $viServerName &lt;br /&gt;
&lt;p /&gt;
					if ($i -eq 5)&lt;br /&gt;
						{&lt;br /&gt;
							$failMsg = "Failed to connect to $viServerName after $i attempts"&lt;br /&gt;
							$failMsg | out-file $logfile -append&lt;br /&gt;
						}&lt;br /&gt;
				$i++&lt;br /&gt;
			} &lt;br /&gt;
&lt;p /&gt;
		} 		&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</description>
      <pubDate>Thu, 15 Oct 2009 08:11:05 GMT</pubDate>
      <author>leeplastic</author>
      <guid>http://communities.vmware.com/thread/236898</guid>
      <dc:date>2009-10-15T08:11:05Z</dc:date>
      <clearspace:dateToText>1 month, 2 days ago</clearspace:dateToText>
      <clearspace:messageCount>10</clearspace:messageCount>
      <clearspace:replyCount>9</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, 5 hours ago</clearspace:dateToText>
      <clearspace:messageCount>13</clearspace:messageCount>
      <clearspace:replyCount>12</clearspace:replyCount>
    </item>
    <item>
      <title>How do I use a list of VM's from Get-Content to get details on the VM's?</title>
      <link>http://communities.vmware.com/thread/236396</link>
      <description>&lt;br /&gt;
Can you help me out?  I have a list of VM names I want to get details on from the vSphere PowerCLI.  When I use get-content to read the flat-file list of VM names I am specifically interested in,  how do I transform the name of the VM into a VM object so I can look up the details I want for each VM in my user-specified input list?  This code does not quite work.  Be gentle, I am beginner at this.  Any help on this is greatly appreciated.  &lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
$MyList = Get-Content C:\Specific_List_of_VM_Names.txt &lt;br /&gt;
&lt;p /&gt;
MyList | Get-VMGuest | Select VmName -ExpandProperty Disks | &lt;br /&gt;
Select VmName, Path, $hdCapacity, $hdSpaceUsed, $hdFreeSpace, $hdPercFree | &lt;br /&gt;
Export-Csv $filelocation -NoTypeInformation -Force # Export output to csv</description>
      <pubDate>Mon, 12 Oct 2009 19:35:44 GMT</pubDate>
      <author>toddvoros</author>
      <guid>http://communities.vmware.com/thread/236396</guid>
      <dc:date>2009-10-12T19:35:44Z</dc:date>
      <clearspace:dateToText>1 month, 1 week ago</clearspace:dateToText>
      <clearspace:messageCount>10</clearspace:messageCount>
      <clearspace:replyCount>9</clearspace:replyCount>
    </item>
    <item>
      <title>resolveMultipleUnresolvedvmfsVolumes  - Cannot Change the Host Configuration</title>
      <link>http://communities.vmware.com/thread/236309</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
I have successfully managed to resignature snapped LUNs using the HostDataStoreSystem.ResignatureUnresolvedVmfsVolume_task however this method is very slow when there are 11 volumes that need to be added and causes me timing issues.&lt;br /&gt;
&lt;br /&gt;
I thought I would recode using the hostStorageSystem.resolveMultipleUnresolvedVmfsVolumes as I am assuming this may be a bit quicker and not continue executing the script until it has finished.  When calling the method I get "Cannot Change the Host Configuration" after 30 seconds or so.  I see that someone else had the same problem when trying to execute a similar function from the remote cli so am assuming this is a bug.&lt;br /&gt;
&lt;br /&gt;
Does anyone know what the workaround might be for powercli ?&lt;br /&gt;
&lt;br /&gt;
thanks &lt;br /&gt;
&lt;br /&gt;
Mike</description>
      <pubDate>Mon, 12 Oct 2009 14:38:30 GMT</pubDate>
      <author>mike lim</author>
      <guid>http://communities.vmware.com/thread/236309</guid>
      <dc:date>2009-10-12T14:38:30Z</dc:date>
      <clearspace:dateToText>1 month, 4 days ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>How to check if license is valid or not</title>
      <link>http://communities.vmware.com/thread/236084</link>
      <description>I am doing a parameterized silent install of vSphere vCenter server, and my provisioning GUI collects information and build the command line for use.&lt;br /&gt;
&lt;br /&gt;
Now, I need to validate if the license entered by the user is valid or not ? vCenter server installation will then be kicked in.&lt;br /&gt;
&lt;br /&gt;
Is there a way to parse / validate the license is accurate/valid ?&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
H.</description>
      <pubDate>Sat, 10 Oct 2009 04:22:42 GMT</pubDate>
      <author>harkamal</author>
      <guid>http://communities.vmware.com/thread/236084</guid>
      <dc:date>2009-10-10T04:22:42Z</dc:date>
      <clearspace:dateToText>1 month, 5 days ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Using the diskpath option when cloning from a template</title>
      <link>http://communities.vmware.com/thread/236000</link>
      <description>&lt;br /&gt;
Has anyone used the diskpath option when doing bulk deployments from a template? We would like to deploy the VMs and modify the disk paths independently.  The cmdlets reference does not give an example fo the syntax.&lt;br /&gt;
&lt;br /&gt;
VMDK1 goes to datastores in variable A &lt;br /&gt;
&lt;p /&gt;
VMDK2 goes to datastores in variable B &lt;br /&gt;
&lt;p /&gt;
We are currently using the datastore option to spread the deployment on multiple datastores, but these VMs need a second VMDK on a different set of datastores.</description>
      <pubDate>Fri, 09 Oct 2009 14:30:33 GMT</pubDate>
      <author>dmn0211</author>
      <guid>http://communities.vmware.com/thread/236000</guid>
      <dc:date>2009-10-09T14:30:33Z</dc:date>
      <clearspace:dateToText>1 month, 2 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>New-VMHostNetworkAdapter The resource vim.host.PortGroup VMotion is in use Error.</title>
      <link>http://communities.vmware.com/thread/235960</link>
      <description>&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;p /&gt;
playing with the following simple cmdlets and a new ESX 4i I'm getting the  "&lt;b&gt;The resource vim.host.PortGroup VMotion is in use"&lt;/b&gt; Error. &lt;br /&gt;
Even if I get the error, port group has been created correctly with VMotion flag enabled.&lt;br /&gt;
&lt;p /&gt;
&lt;i&gt;# Creates vSwitches&lt;/i&gt; &lt;br /&gt;
&lt;i&gt;$vs1 = New-VirtualSwitch -Name vSwitch1 -Nic vmnic1&lt;/i&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;i&gt;# Enables a vSwitch for VMotion&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;New-VMHostNetworkAdapter -PortGroup VMotion -VirtualSwitch $vs1 -IP 192.168.10.1 -SubnetMask 255.255.255.0 -VMotionEnabled $true&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;p /&gt;
What I'm doing wrong ?&lt;br /&gt;
&lt;p /&gt;
Anyone is having same problem ?&lt;br /&gt;
&lt;p /&gt;
Fabio</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">cmdlet</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">error</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">esxi</category>
      <pubDate>Fri, 09 Oct 2009 09:44:13 GMT</pubDate>
      <author>fsecchia</author>
      <guid>http://communities.vmware.com/thread/235960</guid>
      <dc:date>2009-10-09T09:44:13Z</dc:date>
      <clearspace:dateToText>1 month, 2 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Building VMs via CSV</title>
      <link>http://communities.vmware.com/thread/234783</link>
      <description>&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;p /&gt;
 Trying to write a script that pulls info from a csv and builds the vm shells. For the most part I have been trying to keep it really simple and then add some error handling around it later. Right now I have ran into a snag. So of my vms will have one hard disks and others will have two. I can create the vm's with two hard disks fine, the problem I run into is when I only want to create the one hard disk. The script is looking for a value in the CSV under DiskMB2. So I need to change this script to look at the DiskMB2 column in the CSV field and if the value is blank or null skip it and move on. Below is the script I am currently using, thanks for any and all help.&lt;br /&gt;
&lt;p /&gt;
foreach ($f in (Import-Csv d:\vmparm.csv)) {New-VM &lt;i&gt;-name&lt;/i&gt; $f.vmname &lt;i&gt;-VMHost&lt;/i&gt; $f.hostname &lt;i&gt;-DiskMB&lt;/i&gt; $f.diskmb1,$f.diskMB2 &lt;i&gt;-MemoryMB&lt;/i&gt; $f.memorymbv+-NumCpu $f.numcpu &lt;i&gt;-GuestId&lt;/i&gt; $f.guestid &lt;i&gt;-NetworkName&lt;/i&gt; $f.netname+}&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;br /&gt;</description>
      <pubDate>Fri, 02 Oct 2009 14:36:37 GMT</pubDate>
      <author>jasonrobinson</author>
      <guid>http://communities.vmware.com/thread/234783</guid>
      <dc:date>2009-10-02T14:36:37Z</dc:date>
      <clearspace:dateToText>1 month, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>2</clearspace:messageCount>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>Update-tools failure</title>
      <link>http://communities.vmware.com/thread/234606</link>
      <description>&lt;br /&gt;
This is my first time attempting to update vmware tools using powerCLI.  When i run the following:&lt;br /&gt;
&lt;p /&gt;
update-tools -vm MyVM&lt;br /&gt;
&lt;p /&gt;
 It returns the error below: &lt;br /&gt;
&lt;p /&gt;
Update-Tools : 10/1/2009 11:47:15 AM    Update-Tools    A20F0440-3E1B-452D-B6FE&lt;br /&gt;
-028CF80861E9    Operation "Update VMware Tools" failed for VM "MyVM" for&lt;br /&gt;
the following reason: The operation for the entity vm-13988 failed with the fol&lt;br /&gt;
lowing message: "The operation is not supported on the object."&lt;br /&gt;
At line:1 char:13&lt;br /&gt;
+ update-tools  &amp;lt;&amp;lt;&amp;lt;&amp;lt; -vm MyVM&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Has anyone experienced this before? Any thoughts on how to resolve it?&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;
Jeff</description>
      <pubDate>Thu, 01 Oct 2009 16:50:31 GMT</pubDate>
      <author>jpoling</author>
      <guid>http://communities.vmware.com/thread/234606</guid>
      <dc:date>2009-10-01T16:50:31Z</dc:date>
      <clearspace:dateToText>1 month, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Move Logfiles in multiple subdirectories on VM to remote location</title>
      <link>http://communities.vmware.com/thread/233754</link>
      <description>&lt;br /&gt;
I have been trying to find a way to move logfiles in multiple subdirectories to a remote location where there is one directory. For exampe:&lt;br /&gt;
&lt;p /&gt;
c:\appsyslogs has subdirectories for every day . Id like to move those to &lt;strike&gt;file://fileserver/syslogs/&lt;/strike&gt;&lt;br /&gt;
&lt;p /&gt;
 $files = ls c:\appsyslogs -recurse -Include *.log |foreach-object{copy $_ e:\syslogs}&lt;br /&gt;
&lt;p /&gt;
Problem is that Id like to MOVE instead of copy, and Id like to insert a UNC path instead of a mapped drive.Also how can I create a logfile for what has been moved or not or if there is an attempted file overwrite for duplicates? &lt;br /&gt;
&lt;p /&gt;
Finally , as part of this process Id also like to pull a particular registry key to a file and copy it over as well</description>
      <pubDate>Sat, 26 Sep 2009 14:49:58 GMT</pubDate>
      <author>kwharrisit</author>
      <guid>http://communities.vmware.com/thread/233754</guid>
      <dc:date>2009-09-26T14:49:58Z</dc:date>
      <clearspace:dateToText>1 month, 4 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </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, 19 hours ago</clearspace:dateToText>
      <clearspace:messageCount>6</clearspace:messageCount>
      <clearspace:replyCount>5</clearspace:replyCount>
    </item>
    <item>
      <title>Reset alarm to green</title>
      <link>http://communities.vmware.com/thread/233087</link>
      <description>&lt;br /&gt;
I created alarm for a host, and it rings as expected.&lt;br /&gt;
&lt;p /&gt;
However, even after acknowledging the alarm, the red warning pointer on the host is still appearing. I have to manually click "Reset alarm to green" to make it go away.&lt;br /&gt;
&lt;p /&gt;
Could not find an equivalent method in Alarm Manager to "Reset alarm to green"... can someone guide where is this API ?&lt;br /&gt;
&lt;p /&gt;
Please also see the snapshot for more clarity</description>
      <pubDate>Wed, 23 Sep 2009 07:56:10 GMT</pubDate>
      <author>harkamal</author>
      <guid>http://communities.vmware.com/thread/233087</guid>
      <dc:date>2009-09-23T07:56:10Z</dc:date>
      <clearspace:dateToText>1 month, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>11</clearspace:messageCount>
      <clearspace:replyCount>10</clearspace:replyCount>
    </item>
    <item>
      <title>HostProfile [Data Object - HostConfigSpec]</title>
      <link>http://communities.vmware.com/thread/232850</link>
      <description>I need to create a hostProfile by hand (and not create it from a reference host) using HostConfigSpec.. but I don'e see any examples on google.&lt;br /&gt;
&lt;br /&gt;
I intent to use this coded hostProfile as my provisioning system for new hosts. &lt;br /&gt;
&lt;p /&gt;
Can someone point to few examples or developer guide for Hostprofiles.&lt;br /&gt;
&lt;p /&gt;
Thanks.</description>
      <pubDate>Tue, 22 Sep 2009 09:40:21 GMT</pubDate>
      <author>harkamal</author>
      <guid>http://communities.vmware.com/thread/232850</guid>
      <dc:date>2009-09-22T09:40:21Z</dc:date>
      <clearspace:dateToText>2 months, 1 day ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Get-stat performance avgs for ESXi</title>
      <link>http://communities.vmware.com/thread/232790</link>
      <description>&lt;br /&gt;
Hi all,&lt;br /&gt;
&lt;p /&gt;
 I referenced a previous thread (&lt;a class="jive-link-external" href="http://communities.vmware.com/message/957517#957517"&gt;http://communities.vmware.com/message/957517#957517&lt;/a&gt;) to obtain CPU averages which has worked out well for ESX hosts but I am having some trouble with obtaining the same statistics for ESXi hosts.&lt;br /&gt;
&lt;p /&gt;
Two issues:&lt;br /&gt;
&lt;p /&gt;
1) When I run "Get-Stat -Entity (Get-VMHost) -Stat cpu.usagemhz.average -IntervalMins 120 | Export-Csv c:\VMware_HostUsage2.csv" when connecting to a VC server, it only runs against ESX servers successfully and when it tries to run against ESXi servers it returns with:&lt;br /&gt;
&lt;p /&gt;
 Get-Stat : 9/21/2009 4:18:50 PM    Get-Stat        The metric counter "cpu.usag&lt;br /&gt;
emhz.average" doesn't exist for entity "server".&lt;br /&gt;
&lt;p /&gt;
2) Interestingly enough when I run the same line directly to a ESXi server, it runs but with one caveat.  No matter how I alter the IntervalMins it always defaults to 20 seconds and outputs only 1hr of data.  &lt;br /&gt;
&lt;p /&gt;
Any thoughts? Thanks in advance.</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-stat</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">script</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">reporting</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">report</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vmware</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vm</category>
      <pubDate>Mon, 21 Sep 2009 23:36:28 GMT</pubDate>
      <author>kaizenwerks</author>
      <guid>http://communities.vmware.com/thread/232790</guid>
      <dc:date>2009-09-21T23:36:28Z</dc:date>
      <clearspace:dateToText>2 months, 5 hours ago</clearspace:dateToText>
      <clearspace:messageCount>9</clearspace:messageCount>
      <clearspace:replyCount>8</clearspace:replyCount>
    </item>
    <item>
      <title>Script to Update/Install vmware-tools, update VM version?</title>
      <link>http://communities.vmware.com/thread/232758</link>
      <description>&lt;br /&gt;
Anyone got a good script to install/update tools, bring the VM down, update the VM version (as required after a ESX 3.5 -&amp;gt; vSphere upgrade) and bring the vm up?&lt;br /&gt;
&lt;p /&gt;
Bonus points for optionally aligning the VM while it is down (Netapp mbrscan/mbralign) - (option, since this operation can take hours depending on size of VM on disk) &lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
thanks&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
VCP</description>
      <pubDate>Mon, 21 Sep 2009 20:34:01 GMT</pubDate>
      <author>fletch00</author>
      <guid>http://communities.vmware.com/thread/232758</guid>
      <dc:date>2009-09-21T20:34:01Z</dc:date>
      <clearspace:dateToText>2 months, 3 days ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>adding a vmnic to vswitch0</title>
      <link>http://communities.vmware.com/thread/232743</link>
      <description>&lt;br /&gt;
i am trying to add a vmnic to  vswitch0 , which is the management switch using the following&lt;br /&gt;
&lt;p /&gt;
$vs = Get-virtualSwitch -Name Vswitch0  -VMHOST (Get-VMHOST 10.4.50.200)&lt;br /&gt;
&lt;p /&gt;
Set-VirtualSwitch -virtualswitch vswitch0 -Nic Vmnic3&lt;br /&gt;
&lt;p /&gt;
but i think the whole syntax is wrong can someone point me in the right direction&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
thanks&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;</description>
      <pubDate>Mon, 21 Sep 2009 20:17:09 GMT</pubDate>
      <author>TSWintel</author>
      <guid>http://communities.vmware.com/thread/232743</guid>
      <dc:date>2009-09-21T20:17:09Z</dc:date>
      <clearspace:dateToText>1 month, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>vCenter - Query active triggered alarms</title>
      <link>http://communities.vmware.com/thread/232704</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
i would like to query the vCenter for any active triggered alarms (in my example Datastore Disk Usage/ Overallocation alarms) with powershell.&lt;br /&gt;
&lt;br /&gt;
Is this possible ? &lt;br /&gt;
&lt;br /&gt;
I'm not sure if "Get-VIEvent" is right (because it retrieves many/all events ?) &lt;br /&gt;
&lt;br /&gt;
It is possible to detect if an alarm has acknowledged ?&lt;br /&gt;
&lt;p /&gt;
Thanks for help&lt;br /&gt;
&lt;p /&gt;
Debcha</description>
      <pubDate>Mon, 21 Sep 2009 17:25:47 GMT</pubDate>
      <author>Debcha</author>
      <guid>http://communities.vmware.com/thread/232704</guid>
      <dc:date>2009-09-21T17:25:47Z</dc:date>
      <clearspace:dateToText>2 months, 3 days ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>PowerCLI and SSH</title>
      <link>http://communities.vmware.com/thread/232600</link>
      <description>How to copy vmdk files via ssh and powercli?&lt;br /&gt;
&lt;br /&gt;
Want to copy some virtual servers files from a server to another esx server at a different site</description>
      <pubDate>Mon, 21 Sep 2009 09:27:40 GMT</pubDate>
      <author>teddyboy</author>
      <guid>http://communities.vmware.com/thread/232600</guid>
      <dc:date>2009-09-21T09:27:40Z</dc:date>
      <clearspace:dateToText>2 months, 2 days ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>PowerShell and View Manager 3.1.x</title>
      <link>http://communities.vmware.com/thread/232428</link>
      <description>&lt;br /&gt;
Hello,&lt;br /&gt;
&lt;p /&gt;
It seems this board is mostly for vSphere users (The current release of View 3.1.x does not function with ESX 4.0) but I was wondering if anyone could comment on the use of PowerShell to schedule/automate VMware View pool enabling/disabling.&lt;br /&gt;
&lt;p /&gt;
I'd like to define a few pools and simply enable them at a given time and disable them at a given time but View 3.1.x does not support scheduling. It seems like PowerShell could be use to handle the scheduling.&lt;br /&gt;
&lt;p /&gt;
If anyone has some ideas, I'd be most grateful.&lt;br /&gt;
&lt;p /&gt;
Thanks,&lt;br /&gt;
Phil</description>
      <pubDate>Sat, 19 Sep 2009 06:42:09 GMT</pubDate>
      <author>AUPhil</author>
      <guid>http://communities.vmware.com/thread/232428</guid>
      <dc:date>2009-09-19T06:42:09Z</dc:date>
      <clearspace:dateToText>2 months, 1 day ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>Using PowerCLi to get a snapshot list including snapshot sizes on Disk</title>
      <link>http://communities.vmware.com/thread/232071</link>
      <description>&lt;br /&gt;
I am looking for a Script who lists the snapshots from every guest including the snapshot sizes of every guest. &lt;br /&gt;
&lt;p /&gt;
I have tried some scripts found in the threads but nothing worked very exactly.  Maybe the solution is simple, but i am new in powershell. Could anyone help me to get me a little bit closer to the Solution?</description>
      <pubDate>Thu, 17 Sep 2009 14:18:14 GMT</pubDate>
      <author>LarsOliver</author>
      <guid>http://communities.vmware.com/thread/232071</guid>
      <dc:date>2009-09-17T14:18:14Z</dc:date>
      <clearspace:dateToText>2 months, 6 hours ago</clearspace:dateToText>
      <clearspace:messageCount>6</clearspace:messageCount>
      <clearspace:replyCount>5</clearspace:replyCount>
    </item>
    <item>
      <title>Deploying VMDKs from template to 2 separate datastores</title>
      <link>http://communities.vmware.com/thread/232043</link>
      <description>Hello VMTN,&lt;br /&gt;
&lt;br /&gt;
I'm looking into using PowerCLI to automate VM deployment from a group of templates.&lt;br /&gt;
&lt;br /&gt;
Typically our templates have two VMDKs that we separate across two datastores using the 'advanced' dialogue box in the datastore section of the Deploy Template Wizard (vCenter2.5).&lt;br /&gt;
&lt;br /&gt;
However, in PowerCLI it seems the New-VM -Datastore switch only accepts one argument.&lt;br /&gt;
&lt;br /&gt;
Does anyone know of a way to get a template deploying its disks onto two datastores?&lt;br /&gt;
&lt;br /&gt;
Thanks very much guys&lt;br /&gt;
&lt;br /&gt;
Steven</description>
      <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">deployment</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">new-vm</category>
      <pubDate>Thu, 17 Sep 2009 10:46:03 GMT</pubDate>
      <author>sthwaites</author>
      <guid>http://communities.vmware.com/thread/232043</guid>
      <dc:date>2009-09-17T10:46:03Z</dc:date>
      <clearspace:dateToText>2 months, 6 days ago</clearspace:dateToText>
      <clearspace:messageCount>4</clearspace:messageCount>
      <clearspace:replyCount>3</clearspace:replyCount>
    </item>
    <item>
      <title>Copy files from a datastore to a network location</title>
      <link>http://communities.vmware.com/thread/231960</link>
      <description>&lt;br /&gt;
Hi all,&lt;br /&gt;
&lt;p /&gt;
I was wondering if there was a way to script the copy of files (specifically syslog files) from a datastore to a network location.  If so, it would be great if someone should shed some light on how to script this.  Thanks!</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">automation</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">esxi</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powercli</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powershell</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">script</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vmware</category>
      <pubDate>Wed, 16 Sep 2009 21:02:40 GMT</pubDate>
      <author>kaizenwerks</author>
      <guid>http://communities.vmware.com/thread/231960</guid>
      <dc:date>2009-09-16T21:02:40Z</dc:date>
      <clearspace:dateToText>2 months, 3 days ago</clearspace:dateToText>
      <clearspace:messageCount>9</clearspace:messageCount>
      <clearspace:replyCount>8</clearspace:replyCount>
    </item>
    <item>
      <title>Strange PowerCLI Problem with Get-VM</title>
      <link>http://communities.vmware.com/thread/231702</link>
      <description>&lt;br /&gt;
I am having a really strange problem with PowerCLI on a certain vCenter. Any help would be appreciated. &lt;br /&gt;
&lt;p /&gt;
Background:&lt;br /&gt;
&lt;br /&gt;
-On a certain vCenter when I issue the command &lt;i&gt;get-vm&lt;/i&gt; I get the following error message:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Get-VM : Object reference not set to an instance of an object.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
-Get-VM&lt;br /&gt;
gets all the VM objects that vCenter can see and returns an array&lt;br /&gt;
populated with the objects. The .NET error that I am getting is saying&lt;br /&gt;
that an array cannot be populated with a null object. It cannot get all&lt;br /&gt;
the VM's for some reason.&lt;br /&gt;
&lt;br /&gt;
-This can be confirmed by issuing the following command instead:&lt;br /&gt;
&lt;br /&gt;
Get-VMHost &lt;i&gt;&amp;lt;ESX HostName&amp;gt;&lt;/i&gt; | get-vm&lt;br /&gt;
&lt;br /&gt;
-This&lt;br /&gt;
gets all the VM's from a particular host. That works except for on one&lt;br /&gt;
particular host at the moment. When I run the command on the host in&lt;br /&gt;
question I get the following error:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Get-VM : Value cannot be null.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Parameter name: array&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
-So&lt;br /&gt;
this should point to a problem with that host. However, if I move all&lt;br /&gt;
of the VM's off of that host and try each host individually again, I&lt;br /&gt;
will eventually run into the same error:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Get-VM : Value cannot be null.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Parameter name: array&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
That&lt;br /&gt;
tells me that the problem could be following a certain VM (perhaps&lt;br /&gt;
permissions where a certain VM's properties cannot be read, etc.). However, If I move the VM's off of the Host one by one and keep testing the host, the problem is not resolved.&lt;br /&gt;
&lt;br /&gt;
Strange, right? Does anyone have any ideas on how to move forward with troubleshooting this? Thank you.&lt;br /&gt;
&lt;p /&gt;
Regards,&lt;br /&gt;
&lt;br /&gt;
Harley Stagner</description>
      <pubDate>Tue, 15 Sep 2009 20:00:11 GMT</pubDate>
      <author>hstagner</author>
      <guid>http://communities.vmware.com/thread/231702</guid>
      <dc:date>2009-09-15T20:00:11Z</dc:date>
      <clearspace:dateToText>2 months, 6 days ago</clearspace:dateToText>
      <clearspace:messageCount>7</clearspace:messageCount>
      <clearspace:replyCount>6</clearspace:replyCount>
    </item>
    <item>
      <title>Report number of files in a dir (.snapshot)</title>
      <link>http://communities.vmware.com/thread/231667</link>
      <description>&lt;br /&gt;
Hi, I am about to invest some time learning powershell - gathering resources, command references, editor etc&lt;br /&gt;
&lt;p /&gt;
My first goal is to customize the great dailyreport script (&lt;a class="jive-link-external" href="http://www.virtu-al.net/2009/08/18/powercli-daily-report-v2/"&gt;http://www.virtu-al.net/2009/08/18/powercli-daily-report-v2/&lt;/a&gt; )&lt;br /&gt;
&lt;p /&gt;
I want a section in the report simply telling me how many days retention of netapp snapshots on each NFS datastore&lt;br /&gt;
&lt;p /&gt;
background (I have a linux cronjob to snapshot vm NFS volumes nightly)  the cronjob script has some smarts:&lt;br /&gt;
&lt;p /&gt;
check the volume usage  &amp;#38; if &amp;gt; 90% delete the oldest snapshot before creating the new one. &lt;br /&gt;
&lt;p /&gt;
 Now I want a powershell dailyreport section that will detail how many of those daily snapshots I have - the linux listing of the snap dir looks like the example below&lt;br /&gt;
&lt;p /&gt;
So if I was pseudo-coding - it'd be:&lt;br /&gt;
&lt;p /&gt;
 foreach ds (get-NFS-datastore-list)&lt;br /&gt;
&lt;p /&gt;
  echo  $ds.name , `getDSlisting($ds, .snapshotdir) | grep vmsnap | wc -l ` &lt;br /&gt;
&lt;p /&gt;
end #foreach&lt;br /&gt;
&lt;p /&gt;
The part I need help with is the  getDSlisting($ds, .snapshotdir) -is there a cmd reference documenting this level of operation?&lt;br /&gt;
&lt;p /&gt;
thanks! &lt;br /&gt;
&lt;p /&gt;
&lt;strike&gt;root@backup-02 ~&lt;/strike&gt;# ls -la /fs/vm65net2/.snapshot/&lt;br /&gt;
total 188&lt;br /&gt;
drwxrwxrwx 47 root root 4096 Sep 15 09:28 .&lt;br /&gt;
drwxr-xr-x  4 root root 4096 Oct 30  2008 ..&lt;br /&gt;
drwxr-xr-x  3 root root 4096 Oct 30  2008 hourly.0&lt;br /&gt;
drwxr-xr-x  3 root root 4096 Oct 30  2008 hourly.1&lt;br /&gt;
drwxr-xr-x  3 root root 4096 Oct 30  2008 hourly.2&lt;br /&gt;
drwxr-xr-x  3 root root 4096 Oct 30  2008 hourly.3&lt;br /&gt;
drwxr-xr-x  3 root root 4096 Oct 30  2008 vmsnap.irt-esx65-01.200908061753&lt;br /&gt;
drwxr-xr-x  3 root root 4096 Oct 30  2008 vmsnap.irt-esx65-01.200908071753&lt;br /&gt;
drwxr-xr-x  3 root root 4096 Oct 30  2008 vmsnap.irt-esx65-01.200908081753&lt;br /&gt;
drwxr-xr-x  3 root root 4096 Oct 30  2008 vmsnap.irt-esx65-01.200908091753&lt;br /&gt;
drwxr-xr-x  3 root root 4096 Oct 30  2008 vmsnap.irt-esx65-01.200908101753&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
... &lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
VCP</description>
      <pubDate>Tue, 15 Sep 2009 17:12:09 GMT</pubDate>
      <author>fletch00</author>
      <guid>http://communities.vmware.com/thread/231667</guid>
      <dc:date>2009-09-15T17:12:09Z</dc:date>
      <clearspace:dateToText>2 months, 3 days ago</clearspace:dateToText>
      <clearspace:messageCount>21</clearspace:messageCount>
      <clearspace:replyCount>20</clearspace:replyCount>
    </item>
    <item>
      <title>Add rdm with command line</title>
      <link>http://communities.vmware.com/thread/231584</link>
      <description>&lt;br /&gt;
Hi,&lt;br /&gt;
&lt;p /&gt;
I would hook a rdmp a VM using the command line. &lt;br /&gt;
&lt;br /&gt;
As a first step I created via the command rdmp &lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;vmkfstools -z  /vmfs/devices/disks/vml.123456... /Path/VMname.vmdk&lt;/b&gt;&lt;/u&gt; &lt;br /&gt;
&lt;br /&gt;
As a second step I tried with the command &lt;br /&gt;
&lt;br /&gt;
*_vmware-vim-cmd vmsvc/device.diskaddexisting VMI&lt;br /&gt;
But does not return any error and no hooks the new rdmp &lt;br /&gt;
&lt;br /&gt;
Then I wanted to try using the command vmreconfig.pl, but the only syntax &lt;br /&gt;
&lt;br /&gt;
_&lt;b&gt;. / vmreconfig.pl - url&lt;/b&gt; _&lt;a class="jive-link-external" href="https://esx_host/sdk/vimService"&gt;https://ESX_HOST/sdk/vimService&lt;/a&gt;_ &lt;b&gt;-username USER -password PASSWORD&lt;/b&gt; _&lt;br /&gt;
&lt;br /&gt;
I returned the following error &lt;br /&gt;
&lt;br /&gt;
&lt;span style="color:#ff0000"&gt;Error: Server version unavailable at 'https: / / 172.23.42.211/sdk/vimService.wsdl' &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
I also found this script ( Add-Delete-HD-vSphere-annotated.ps1) but I do not know quite how to use it &lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
Can you kindly help me? &lt;br /&gt;
I do not know what to do.</description>
      <pubDate>Tue, 15 Sep 2009 13:56:23 GMT</pubDate>
      <author>ii00907</author>
      <guid>http://communities.vmware.com/thread/231584</guid>
      <dc:date>2009-09-15T13:56:23Z</dc:date>
      <clearspace:dateToText>2 months, 1 week ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>Event Watcher</title>
      <link>http://communities.vmware.com/thread/230599</link>
      <description>Is there possibility to listen for events something like 'push' method. &lt;br /&gt;
&lt;br /&gt;
For now - i can use infrastructure SDK API to pull events for some particular VM, but i am interested in some &lt;br /&gt;
callback functions or push methods to be notified is some type of event happens</description>
      <pubDate>Wed, 09 Sep 2009 12:41:17 GMT</pubDate>
      <author>harkamal</author>
      <guid>http://communities.vmware.com/thread/230599</guid>
      <dc:date>2009-09-09T12:41:17Z</dc:date>
      <clearspace:dateToText>2 months, 2 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>How to set Details field of a Task under Recent Tasks in vSphere client using java api?</title>
      <link>http://communities.vmware.com/thread/229988</link>
      <description>&lt;p /&gt;
Does anyone know how to populate the details field of the tasks under Recent Tasks in the vSphere client using the java api?&lt;br /&gt;
&lt;br /&gt;
I've tried setting a summary when I register my extension's tasks.  It picks up the label, but doesn't seem to pick up the summary:&lt;br /&gt;
&lt;p /&gt;
                     KeyValue label = new KeyValue();&lt;br /&gt;
                    label.setKey(taskTypeId + ".label");&lt;br /&gt;
                    label.setValue(taskTypeResource.getLabel());&lt;br /&gt;
&lt;br /&gt;
                    KeyValue summary = new KeyValue();&lt;br /&gt;
                    summary.setKey(taskTypeId + ".summary");&lt;br /&gt;
                    summary.setValue(taskTypeResource.getSummary());&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Have also tried setting setting a fault and a result on task.setTaskState().&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Thanks in advance ... &lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;br /&gt;</description>
      <pubDate>Fri, 04 Sep 2009 18:54:57 GMT</pubDate>
      <author>carllaird</author>
      <guid>http://communities.vmware.com/thread/229988</guid>
      <dc:date>2009-09-04T18:54:57Z</dc:date>
      <clearspace:dateToText>2 months, 2 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>2</clearspace:messageCount>
      <clearspace:replyCount>1</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, 6 hours ago</clearspace:dateToText>
      <clearspace:messageCount>19</clearspace:messageCount>
      <clearspace:replyCount>18</clearspace:replyCount>
    </item>
    <item>
      <title>Custom Scheduled Task in Virtual Center</title>
      <link>http://communities.vmware.com/thread/229387</link>
      <description>I am using VI SDK to create a custom scheduled task in Virtual Center. I intent to run a powershell script that connects to VC and does somethings. This appears possible while looking at API (&lt;a class="jive-link-external" href="http://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/vim.action.RunScriptAction.html"&gt;http://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/vim.action.RunScriptAction.html&lt;/a&gt;)&lt;br /&gt;
&lt;br /&gt;
API says it can run "shell" scripts..DOS shell or PowerShell ? Will it allow passthrough login to VC as it is running as scheduled task ?&lt;br /&gt;
&lt;br /&gt;
Can the gurus help confirm if this can achieve intented results ?</description>
      <pubDate>Wed, 02 Sep 2009 14:24:53 GMT</pubDate>
      <author>harkamal</author>
      <guid>http://communities.vmware.com/thread/229387</guid>
      <dc:date>2009-09-02T14:24:53Z</dc:date>
      <clearspace:dateToText>2 months, 2 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>how to disconnect a SCSI device by a virtual machine before running VMotion</title>
      <link>http://communities.vmware.com/thread/229206</link>
      <description>&lt;br /&gt;
Hi , &lt;br /&gt;
&lt;p /&gt;
I need to know the procedure how disconnect a scsi device using the orchestrator &lt;br /&gt;
&lt;p /&gt;
Thank you in advance for your help &lt;br /&gt;
&lt;p /&gt;
Best regards&lt;br /&gt;
&lt;p /&gt;
Gianluca</description>
      <pubDate>Tue, 01 Sep 2009 17:31:32 GMT</pubDate>
      <author>gchi</author>
      <guid>http://communities.vmware.com/thread/229206</guid>
      <dc:date>2009-09-01T17:31:32Z</dc:date>
      <clearspace:dateToText>2 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>How to get a VMHBA path of each vm?</title>
      <link>http://communities.vmware.com/thread/229084</link>
      <description>&lt;br /&gt;
I want to check the VMHBA Path of all RAW devices connected to my host including vmname that the raw device is connected to ,&lt;br /&gt;
&lt;p /&gt;
it is very hard and i don't know if it is possible</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">cmdlet</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vmware</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">esx</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">get-view</category>
      <pubDate>Tue, 01 Sep 2009 07:10:31 GMT</pubDate>
      <author>shatztal</author>
      <guid>http://communities.vmware.com/thread/229084</guid>
      <dc:date>2009-09-01T07:10:31Z</dc:date>
      <clearspace:dateToText>2 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>6</clearspace:messageCount>
      <clearspace:replyCount>5</clearspace:replyCount>
    </item>
    <item>
      <title>Automatic Add and Remove RDM on VM</title>
      <link>http://communities.vmware.com/thread/228595</link>
      <description>Hello, &lt;br /&gt;
I can not find the way to unhook from a Linux virtual machine disk (RDM) and assign another. &lt;br /&gt;
The motivation of this activity is' due to the fact that I have to be coupled, each day the LUN, where the database of Prodi, on a test environment, so every day I should clone the LUN (storage management ok) Remove the LUN above the VM and attach the LUN cloned. &lt;br /&gt;
&lt;br /&gt;
Carrying out this process should automatically. &lt;br /&gt;
&lt;p /&gt;
Could you help me.</description>
      <pubDate>Fri, 28 Aug 2009 13:44:38 GMT</pubDate>
      <author>ii00907</author>
      <guid>http://communities.vmware.com/thread/228595</guid>
      <dc:date>2009-08-28T13:44:38Z</dc:date>
      <clearspace:dateToText>2 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Connect-VIServer issues in script but not in PowerCLI UI</title>
      <link>http://communities.vmware.com/thread/228288</link>
      <description>I have a script that does:&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;Connect-VIServer -server $server `
	-User domain\username `
	-Password my-password
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Doesn't work (with or without the ` marks).  I get this:&lt;br /&gt;
&lt;span style="color:red"&gt;&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;Connect-VIServer : Login failed due to a bad username or password.
At E:\SCM_Virt_vSphereGetHostNICsXml.ps1:17 char:17
+ Connect-VIServer &amp;lt;&amp;lt;&amp;lt;&amp;lt;  $server -User domain\username -Password my-password
    + CategoryInfo          : NotSpecified: (:) [Connect-VIServer], InvalidLog
   inException
    + FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_SoapE
   xception,VMware.VimAutomation.Commands.ConnectVIServer
&lt;/code&gt;&lt;/pre&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
If I comment out the -User -Password parameters so that I just have Connect-VIServer -server $server it will prompt me for credentials.  And when I enter them it connects fine.&lt;br /&gt;
Why would it not like the User/Password hard coded in the script, but works fine if I enter the exact same credentials?&lt;br /&gt;
Outside of the script, on the PowerCLI Command Line I get nearly the same results.  If I supply username/password then I get the error.  If I don't then it just grabs my user credential and connects right away.&lt;br /&gt;
&lt;br /&gt;
This is a cross domain connection.  The box I am on is in one domain and the vCenter instance is in another domain.  So supplying the domain\username is essential.  Not sure if that matters.</description>
      <pubDate>Wed, 26 Aug 2009 21:34:36 GMT</pubDate>
      <author>jkyoutsey</author>
      <guid>http://communities.vmware.com/thread/228288</guid>
      <dc:date>2009-08-26T21:34:36Z</dc:date>
      <clearspace:dateToText>2 months, 4 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>6</clearspace:messageCount>
      <clearspace:replyCount>5</clearspace:replyCount>
    </item>
    <item>
      <title>Technology Exchange Developer Day - Learn about vMA as a platform for deploying scripts and agents</title>
      <link>http://communities.vmware.com/thread/226926</link>
      <description>Hello,&lt;br /&gt;
&lt;br /&gt;
We are happy to announce about our demo at Technology Exchange Developer Day 2009, Learn about vMA as a platform for deploying scripts and agents&lt;br /&gt;
&lt;br /&gt;
Presenter: Ashwath Seshadri&lt;br /&gt;
{youtube}&lt;a class="jive-link-external" href="http://www.youtube.com/watch?v=nUtLStlCK-Q"&gt;http://www.youtube.com/watch?v=nUtLStlCK-Q&lt;/a&gt;{youtube}&lt;br /&gt;
&lt;br /&gt;
Demo ID: DS-23&lt;br /&gt;
&lt;br /&gt;
Time: 5:45 - 6:45 PM&lt;br /&gt;
&lt;br /&gt;
Abstract:&lt;br /&gt;
&lt;br /&gt;
VMware vSphere Management Assistant (vMA) is a prepackaged Linux virtual machine in which &lt;br /&gt;
administrators can deploy scripts and select third-party agents to manage ESX and ESXi systems. &lt;br /&gt;
Software included in vMA includes vSphere CLI, an authentication component that supports &lt;br /&gt;
non-interactive login, and a log collection component. Learn about the features provided vCLI and vMA and how you can integrate with your vSphere environment.</description>
      <category domain="http://communities.vmware.com/tags?communityID=2687">vma</category>
      <category domain="http://communities.vmware.com/tags?communityID=2687">technology_exchange</category>
      <category domain="http://communities.vmware.com/tags?communityID=2687">developer_day</category>
      <category domain="http://communities.vmware.com/tags?communityID=2687">vmworld</category>
      <pubDate>Wed, 19 Aug 2009 02:08:38 GMT</pubDate>
      <author>navadavuluri</author>
      <guid>http://communities.vmware.com/thread/226926</guid>
      <dc:date>2009-08-19T02:08:38Z</dc:date>
      <clearspace:dateToText>3 months, 6 days ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>CLI to Vmotion vms</title>
      <link>http://communities.vmware.com/thread/226712</link>
      <description>Is it possible to uses power cli to vmotion vm off from not responbile host? The host is up and vm are as well, but unable to vmotion via VI Client.</description>
      <pubDate>Tue, 18 Aug 2009 10:51:57 GMT</pubDate>
      <author>sdspin</author>
      <guid>http://communities.vmware.com/thread/226712</guid>
      <dc:date>2009-08-18T10:51:57Z</dc:date>
      <clearspace:dateToText>3 months, 1 week ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>Backup Configuration - VSwitch</title>
      <link>http://communities.vmware.com/thread/226694</link>
      <description>&lt;br /&gt;
Could someone guide me which folder is need to copy or backup for the vSwitch configuration please, or backup the whole configurations is even better.&lt;br /&gt;
&lt;p /&gt;
Some article mentioned about using kickstart or tar these folders /etc/passwd /etc/shadow /etc/group /etc/grub.conf /etc/pam.d /etc/vmware /boot/ /home/.&lt;br /&gt;
&lt;p /&gt;
Is this a best practise? I would prefer to do in powershell and put the scipt as schedule.&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Thanks</description>
      <pubDate>Tue, 18 Aug 2009 08:22:08 GMT</pubDate>
      <author>CapiZikus</author>
      <guid>http://communities.vmware.com/thread/226694</guid>
      <dc:date>2009-08-18T08:22:08Z</dc:date>
      <clearspace:dateToText>3 months, 1 week ago</clearspace:dateToText>
      <clearspace:messageCount>8</clearspace:messageCount>
      <clearspace:replyCount>7</clearspace:replyCount>
    </item>
    <item>
      <title>Aligning VMFS Partition with Powershell</title>
      <link>http://communities.vmware.com/thread/226449</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
Is there a way to check the VMFS partition alignment with powerCLI and also to create VMFS partitions so that they align with 64KB track boundaries?&lt;br /&gt;
&lt;br /&gt;
Thanks.</description>
      <pubDate>Mon, 17 Aug 2009 09:37:31 GMT</pubDate>
      <author>Rogg23</author>
      <guid>http://communities.vmware.com/thread/226449</guid>
      <dc:date>2009-08-17T09:37:31Z</dc:date>
      <clearspace:dateToText>3 months, 1 week ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>Tagging ESX hosts and tracking in VI Client</title>
      <link>http://communities.vmware.com/thread/226335</link>
      <description>We have customised ESX builds, put some additional components as part of our installation process and we wish to include our build number or tag the host. So as to be able to identify which build it is running and be able to query inventory via VI Client or toolkit and take actions.&lt;br /&gt;
&lt;br /&gt;
Es. Which servers running myCustomBuild 5.1 don't have portgroup x&lt;br /&gt;
&lt;br /&gt;
So we put a custom field myCustomBuild and populate the field. However, this is lost whenever host is removed from VC and added again (for tshoot purposes)&lt;br /&gt;
&lt;br /&gt;
We do put myCustomBuild tag in ESX file system when we build it. Is there a way this information can be populated in VI db and visible through VI Client and be able to query through VITK.&lt;br /&gt;
&lt;br /&gt;
Thanks.&lt;br /&gt;
H</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vitk</category>
      <pubDate>Sun, 16 Aug 2009 04:08:10 GMT</pubDate>
      <author>harkamal</author>
      <guid>http://communities.vmware.com/thread/226335</guid>
      <dc:date>2009-08-16T04:08:10Z</dc:date>
      <clearspace:dateToText>2 months, 1 week ago</clearspace:dateToText>
      <clearspace:messageCount>10</clearspace:messageCount>
      <clearspace:replyCount>9</clearspace:replyCount>
    </item>
    <item>
      <title>PowerCLI Reverse Compatibility</title>
      <link>http://communities.vmware.com/thread/226293</link>
      <description>Release notes for PowerCLI mention that it is compatible with VC2.5, ESX3.x&lt;br /&gt;
&lt;br /&gt;
Does it work well with Update Manager Powershell Snapin (VITK 1.0) ? Is that an officially supported configuration or there is a different way for managing update manager in PowerCLI or vSphere4 itself&lt;br /&gt;
&lt;br /&gt;
H.</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powercli</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">update</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">manager</category>
      <pubDate>Sat, 15 Aug 2009 16:09:33 GMT</pubDate>
      <author>harkamal</author>
      <guid>http://communities.vmware.com/thread/226293</guid>
      <dc:date>2009-08-15T16:09:33Z</dc:date>
      <clearspace:dateToText>1 month, 4 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>7</clearspace:messageCount>
      <clearspace:replyCount>6</clearspace:replyCount>
    </item>
    <item>
      <title>compatible with "apcupsd-multimon"</title>
      <link>http://communities.vmware.com/thread/225879</link>
      <description>&lt;br /&gt;
Hi there,&lt;br /&gt;
&lt;p /&gt;
First of all - this vMa is fantastic! Really appreciate the information that is shared within this community.&lt;br /&gt;
&lt;p /&gt;
I've downloaded the latest vMA and installed apcupsd-3.14.7-1el5.x86_64.rpm and works like a charm... But I've noticed that the latest documentation for APC UPS Daemon talks about Network monitoring. I see that there is another package which includes the Multimon CGI program.&lt;br /&gt;
&lt;p /&gt;
I've tried to install the file and it seems that it needs further packages - but it seems that I'm going in endless circles trying to install the right packages for dependencies.&lt;br /&gt;
&lt;p /&gt;
I was wondering if there will be another updated version of VIMA on its way? one that works with, say... apcupsd-multimon-3.14.7-1.el5x86_64.rpm&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Many thanks!</description>
      <category domain="http://communities.vmware.com/tags?communityID=2687">apcupsd</category>
      <category domain="http://communities.vmware.com/tags?communityID=2687">multimon</category>
      <category domain="http://communities.vmware.com/tags?communityID=2687">cgi</category>
      <pubDate>Thu, 13 Aug 2009 02:36:50 GMT</pubDate>
      <author>lhimin</author>
      <guid>http://communities.vmware.com/thread/225879</guid>
      <dc:date>2009-08-13T02:36:50Z</dc:date>
      <clearspace:dateToText>3 months, 1 week ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Learn about vSphere vMA @ Developer - Video</title>
      <link>http://communities.vmware.com/thread/225638</link>
      <description>Folks, Ashwath will be presenting on vMA @ upcoming Tech Ex - Developer Day &lt;br /&gt;
&lt;br /&gt;
Event is August 31st, 2009 Monday @ VMworld 2009&lt;br /&gt;
More info &lt;a class="jive-link-external" href="http://communities.vmware.com/community/developer/techexchange"&gt;http://communities.vmware.com/community/developer/techexchange&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
{youtube}&lt;a class="jive-link-external" href="http://www.youtube.com/watch?v=nUtLStlCK-Q"&gt;http://www.youtube.com/watch?v=nUtLStlCK-Q&lt;/a&gt;{youtube}</description>
      <category domain="http://communities.vmware.com/tags?communityID=2687">technologye</category>
      <category domain="http://communities.vmware.com/tags?communityID=2687">exchange</category>
      <category domain="http://communities.vmware.com/tags?communityID=2687">develoepr_day</category>
      <category domain="http://communities.vmware.com/tags?communityID=2687">vma</category>
      <category domain="http://communities.vmware.com/tags?communityID=2687">esx</category>
      <category domain="http://communities.vmware.com/tags?communityID=2687">sdk</category>
      <category domain="http://communities.vmware.com/tags?communityID=2687">api</category>
      <pubDate>Tue, 11 Aug 2009 22:27:31 GMT</pubDate>
      <author>heyitspablo</author>
      <guid>http://communities.vmware.com/thread/225638</guid>
      <dc:date>2009-08-11T22:27:31Z</dc:date>
      <clearspace:dateToText>3 months, 1 week ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>vSphere SDK for .Net deployment problem - VimService40.XmlSerializers not registered in GAC</title>
      <link>http://communities.vmware.com/thread/225334</link>
      <description>&lt;br /&gt;
I don't know if this is the right place to ask this, but this is the best place I could find.&lt;br /&gt;
&lt;p /&gt;
I've build a C# app that references the Vmware.VIM dll to make use of the vSphere SDK for .Net.&lt;br /&gt;
&lt;p /&gt;
The app works fine on the computer where it was developed.&lt;br /&gt;
&lt;p /&gt;
I packaged the app for deployment using a VS setup project.  The installer runs without error, but when I attempt to run the app I get an error stating, "Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'VimService40.XmlSerializers' or one of its dependencies. The system cannot find the file specified."&lt;br /&gt;
&lt;p /&gt;
Indeed, when I check the GAC for this assembly on the computer with the errror, I do not see ''VimService40.XmlSerializers' in there.  Further, when I check the GAC for the computer where the vSphere SDK is installed, the assembly is there.&lt;br /&gt;
&lt;p /&gt;
I can work around this issue by deploying the PowerCLI to the computer where I want to run this app, but I'd much rather figure out how to get ''VimService40.XmlSerializers'  into the GAC using a windows setup project.&lt;br /&gt;
&lt;p /&gt;
Has anybody else encountered this/figured out what to do about it?</description>
      <pubDate>Mon, 10 Aug 2009 17:18:49 GMT</pubDate>
      <author>chandcv</author>
      <guid>http://communities.vmware.com/thread/225334</guid>
      <dc:date>2009-08-10T17:18:49Z</dc:date>
      <clearspace:dateToText>3 months, 2 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>If you need any sample code to get started, make a request here!</title>
      <link>http://communities.vmware.com/thread/224750</link>
      <description>Need a sample code, then submit your request here:&lt;a class="jive-link-external" href="http://requestbox.slinkset.com/"&gt; CodeCentral Sample Code Request Box&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
We assure you that all the requests will be processed promptly.&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
For more information on how this works:&lt;a class="jive-link-external" href="http://blogs.vmware.com/codecentral/2009/08/community-sample-code-request-box-feedback.html"&gt; Learn about Sample Code Request Box and CodeCentral Feedback&lt;/a&gt;</description>
      <category domain="http://communities.vmware.com/tags?communityID=3087">vsphere</category>
      <category domain="http://communities.vmware.com/tags?communityID=3087">vcli</category>
      <category domain="http://communities.vmware.com/tags?communityID=3087">4.0</category>
      <category domain="http://communities.vmware.com/tags?communityID=3087">help</category>
      <category domain="http://communities.vmware.com/tags?communityID=3087">sample_scripts</category>
      <category domain="http://communities.vmware.com/tags?communityID=3087">script</category>
      <category domain="http://communities.vmware.com/tags?communityID=3087">sample_code</category>
      <category domain="http://communities.vmware.com/tags?communityID=3087">sample</category>
      <category domain="http://communities.vmware.com/tags?communityID=3087">code</category>
      <pubDate>Thu, 06 Aug 2009 00:09:30 GMT</pubDate>
      <author>navadavuluri</author>
      <guid>http://communities.vmware.com/thread/224750</guid>
      <dc:date>2009-08-06T00:09:30Z</dc:date>
      <clearspace:dateToText>3 months, 2 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>If you need any sample code to get started, make a request here!</title>
      <link>http://communities.vmware.com/thread/224749</link>
      <description>Need a sample code, then submit your request here:&lt;a class="jive-link-external" href="http://requestbox.slinkset.com/"&gt; CodeCentral Sample Code Request Box&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
We assure you that all the requests will be processed promptly.&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
For more information on how this works:&lt;a class="jive-link-external" href="http://blogs.vmware.com/codecentral/2009/08/community-sample-code-request-box-feedback.html"&gt; Learn about Sample Code Request Box and CodeCentral Feedback&lt;/a&gt;</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">help</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">sample_code</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">sample_script</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">scripting</category>
      <pubDate>Thu, 06 Aug 2009 00:08:34 GMT</pubDate>
      <author>navadavuluri</author>
      <guid>http://communities.vmware.com/thread/224749</guid>
      <dc:date>2009-08-06T00:08:34Z</dc:date>
      <clearspace:dateToText>3 months, 2 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>Invalid configuration for device '0' when removing hard disk</title>
      <link>http://communities.vmware.com/thread/224239</link>
      <description>&lt;br /&gt;
I have a script that I've put together from various posts and very useful advice from Luc-D that we use for DR. It runs through a list of datastores and registers any .VMX files it finds. At the same time it changes the NIC configuration and removes all hard disks apart from hard disk 1. Hard disks are removed because they are invalid in the recovered .VMX file due to the path changing, they are  added back using another script later on in the recovery process.  &lt;br /&gt;
&lt;p /&gt;
Until recently it worked just fine, but after an upgrade to ESX 3.5U4 and VirtuaCenter 2.5 (previously on ESX 3.02 &amp;#38; VC 2)  it has stopped working. We tried removing the hard disks manually via the VI Client but that didn't work either. It was then discovered that it would work if  connected directly to the ESX server rather than the VC. &lt;br /&gt;
&lt;p /&gt;
A discussion with VMWare support concluded that this is a feature of newer versions of the virtualcenter whereby it is not possible to remove an invalid virtual hard disk or there abouts. This seems most odd.&lt;br /&gt;
&lt;p /&gt;
The script I'm running uses the following to remove the hard disks:&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;br /&gt;
&lt;table class="jive-wiki-table"&gt;
&lt;tr&gt;
&lt;td&gt;function removevolumes &lt;br /&gt;
			{&lt;br /&gt;
			param ($vmObj)&lt;br /&gt;
			#    write $vmObj.config.hardware.device&lt;br /&gt;
			foreach ($dev in $vmObj.config.hardware.device) &lt;br /&gt;
			{&lt;br /&gt;
			# Look for all volumes apart from Hard Disk 1&lt;br /&gt;
			if ($dev.deviceinfo.label -match "Hard Disk" -and $dev.deviceinfo.label -ne "Hard Disk 1" )&lt;br /&gt;
			{&lt;br /&gt;
			$spec = New-Object VMware.Vim.VirtualMachineConfigSpec&lt;br /&gt;
			$spec.deviceChange = @()&lt;br /&gt;
			$spec.DeviceChange += New-Object VMware.Vim.VirtualDeviceConfigSpec&lt;br /&gt;
			if($dev -eq $null) {return}&lt;br /&gt;
			$spec.deviceChange[0].device += $dev&lt;br /&gt;
			$spec.deviceChange[0].operation = "remove"&lt;br /&gt;
			$dev.deviceinfo.label&lt;br /&gt;
			write $vmObj.ReconfigVM_Task($spec)&lt;br /&gt;
			#$taskMoRef = $vmObj.ReconfigVM_Task($spec)&lt;br /&gt;
			$task = Get-View $taskMoRef&lt;br /&gt;
			# Wait for the task to complete&lt;br /&gt;
			while($task.info.state -eq "running" -or $task.info.state -eq "queued")&lt;br /&gt;
			{&lt;br /&gt;
			$task = Get-View $taskMoRef&lt;br /&gt;
			}&lt;br /&gt;
			}&lt;br /&gt;
			}&lt;br /&gt;
			}&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;br clear="left" /&gt;
&lt;p /&gt;
Is there another way to remove all of the hard disks? Perhaps directly editing the .VMX and removing the invalid hards?&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Thanks &lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;</description>
      <pubDate>Mon, 03 Aug 2009 15:51:19 GMT</pubDate>
      <author>Trebormint</author>
      <guid>http://communities.vmware.com/thread/224239</guid>
      <dc:date>2009-08-03T15:51:19Z</dc:date>
      <clearspace:dateToText>2 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>6</clearspace:messageCount>
      <clearspace:replyCount>5</clearspace:replyCount>
    </item>
    <item>
      <title>PS Script to extract specific detail help please</title>
      <link>http://communities.vmware.com/thread/223712</link>
      <description>Hello, I am looking to create a script that provides a number of specific parameters. I have picked up quite a few good scripts over time but struggling to put them together to get what I need. Wonder if anyone out there either has a script that does it or can help.&lt;br /&gt;
&lt;br /&gt;
I want to extract into csv the name of all my VM Guests, the number and size of VMDK files associated, the partition sizes within these vmdk files then space used and available within those partitions.&lt;br /&gt;
&lt;p /&gt;
I have a number of vmdk files that have multiple partitions within them and need to capture this as well. Any help appreciated.&lt;br /&gt;
&lt;p /&gt;
Cheers&lt;br /&gt;
&lt;p /&gt;
H</description>
      <pubDate>Thu, 30 Jul 2009 12:18:44 GMT</pubDate>
      <author>Kevin Hamilton</author>
      <guid>http://communities.vmware.com/thread/223712</guid>
      <dc:date>2009-07-30T12:18:44Z</dc:date>
      <clearspace:dateToText>3 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Ouput resource allocation vand resource pool values for VMs via CSV</title>
      <link>http://communities.vmware.com/thread/223526</link>
      <description>&lt;br /&gt;
Hi All, &lt;br /&gt;
&lt;p /&gt;
I am new to scripting and continuing my quest to understand it.  I would like to modify a script that I found on the forum.  I've managed to finagle my way to get it where it is right now but I'd like work through the problem and understand what needs to be added to get the following: &lt;br /&gt;
&lt;p /&gt;
Output the resource allocation (shares, reservations, limits) for each VM and resource pools and continue to output this to csv.  I've attached the script I am working with (VMware_VM.ps1).  In addition, I've also looked at another script with the following code but I'm not quite sure how to integrate it with the original script.  In any case, it would be great to work through this.  Thanks.&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;ol&gt;
&lt;li&gt;Send ResourcePool Information to Document &lt;/li&gt;
&lt;/ol&gt;
&lt;p /&gt;
$contents = @($rp | &lt;b&gt;select-object&lt;/b&gt; Name, MemLimitMB, CpuLimitMhz, NumCPUShares, NumMemShares | &lt;b&gt;Sort-Object&lt;/b&gt; Name) &lt;br /&gt;
&lt;p /&gt;
$columnHeaders = @('Name', 'Memory Limit MB', 'CPU Limit Mhz', 'CPU Shares', 'MEM Shares') &lt;br /&gt;
&lt;p /&gt;
$columnProperties = @('Name', 'MemLimitMB', 'CpuLimitMhz', 'NumCPUShares', 'NumMemShares') &lt;br /&gt;
&lt;p /&gt;
$Heading = "Resource Pool Information" &lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;br /&gt;</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">select-object</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">get-vm</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">report</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powershell</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">vi_toolkit_windows</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vmware</category>
      <pubDate>Wed, 29 Jul 2009 15:37:30 GMT</pubDate>
      <author>kaizenwerks</author>
      <guid>http://communities.vmware.com/thread/223526</guid>
      <dc:date>2009-07-29T15:37:30Z</dc:date>
      <clearspace:dateToText>3 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>Move-VM + thin-provisioning?</title>
      <link>http://communities.vmware.com/thread/223395</link>
      <description>&lt;br /&gt;
In vSphere, you can (via the GUI) Storage VMotion a VM and change its disk type to Thin Provisioned. Is there any way to do this through the provided Move-VM cmdlet? Or do I need to resort to using the API RelocateVM_Task and provide the  VirtualMachineRelocateTransformation as sparse?&lt;br /&gt;
&lt;p /&gt;
 If it's the latter - might I put in a feature request?  &lt;img class="jive-emoticon" border="0" src="http://communities.vmware.com/images/emoticons/happy.gif" alt=":)" /&gt;</description>
      <pubDate>Wed, 29 Jul 2009 05:55:19 GMT</pubDate>
      <author>justin.emerson</author>
      <guid>http://communities.vmware.com/thread/223395</guid>
      <dc:date>2009-07-29T05:55:19Z</dc:date>
      <clearspace:dateToText>1 month, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>9</clearspace:messageCount>
      <clearspace:replyCount>8</clearspace:replyCount>
    </item>
    <item>
      <title>get-cluster timing out</title>
      <link>http://communities.vmware.com/thread/223381</link>
      <description>I just wrote a health check script and it ran well in the tst lab.&lt;br /&gt;
&lt;br /&gt;
Now that I've ported it over to Production I'm getting lots of "The operation has timed out" messages.  I never have any timeout issues with the VI client GUI running on the same desktop that the scripts runs from.&lt;br /&gt;
&lt;br /&gt;
Any thoughts why I might be getting these timeout errors under powerCLI?  From what I've seen, they always seem to fail when performing  get-cluster or get-cluster -name $cluster_name | get-view commands.&lt;br /&gt;
&lt;br /&gt;
my vCenter server CPU is not spiked and I've got physical memory left in the guest OS.&lt;br /&gt;
&lt;br /&gt;
Ben</description>
      <pubDate>Tue, 28 Jul 2009 21:48:47 GMT</pubDate>
      <author>BenConrad</author>
      <guid>http://communities.vmware.com/thread/223381</guid>
      <dc:date>2009-07-28T21:48:47Z</dc:date>
      <clearspace:dateToText>3 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>Changes to the ESX Service Console for ESX 4.0</title>
      <link>http://communities.vmware.com/thread/222644</link>
      <description>&lt;br /&gt;
Please check out the attched document for this information &lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
This technical paper discusses incompatibilities between the ESX 3.5 service&lt;br /&gt;
console and the ESX 4.0 service console. Included are suggestions of what you might do to upgrade your&lt;br /&gt;
existing environments that depend on the ESX service console. This document also discusses how you might&lt;br /&gt;
bridge the gap to support ESXi, which does not include a service console. And finally, if you are currently&lt;br /&gt;
writing applications that run in the ESX service console, this document suggests some possible options you&lt;br /&gt;
have for transitioning away from it.</description>
      <category domain="http://communities.vmware.com/tags?communityID=2687">changes</category>
      <category domain="http://communities.vmware.com/tags?communityID=2687">service_console</category>
      <category domain="http://communities.vmware.com/tags?communityID=2687">esx_4</category>
      <pubDate>Fri, 24 Jul 2009 01:36:02 GMT</pubDate>
      <author>navadavuluri</author>
      <guid>http://communities.vmware.com/thread/222644</guid>
      <dc:date>2009-07-24T01:36:02Z</dc:date>
      <clearspace:dateToText>4 months, 2 days ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>Anyone else having problems posting to the vCLI community ?</title>
      <link>http://communities.vmware.com/thread/222573</link>
      <description>Folks we have had reports of posting docs, discussion in this community,,, If you are having problems please let us know, PM, twitter @heyitspablo</description>
      <pubDate>Thu, 23 Jul 2009 16:30:36 GMT</pubDate>
      <author>heyitspablo</author>
      <guid>http://communities.vmware.com/thread/222573</guid>
      <dc:date>2009-07-23T16:30:36Z</dc:date>
      <clearspace:dateToText>4 months, 2 days ago</clearspace:dateToText>
      <clearspace:messageCount>2</clearspace:messageCount>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>Coffee Talk Webinar: Extending PowerCLI to Enterprise Applications with Virtualization EcoShell</title>
      <link>http://communities.vmware.com/thread/222424</link>
      <description>Folks - Happy to have Scott H. present at our upcoming Coffee Talk Webinar. Wed August 5th, 2009 9:00 AM PST&lt;br /&gt;
&lt;br /&gt;
-&amp;gt; PDF Attached &lt;br /&gt;
-&amp;gt; Web Ex Recording &lt;br /&gt;
&lt;a class="jive-link-external" href="https://vmware.webex.com/vmware/lsr.php?AT=pb&amp;#38;SP=MC&amp;#38;rID=34440042&amp;#38;rKey=467fdfafb577017e"&gt;https://vmware.webex.com/vmware/lsr.php?AT=pb&amp;#38;SP=MC&amp;#38;rID=34440042&amp;#38;rKey=467fdfafb577017e&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
Abstract: IT organizations are identifying increasingly more flexible ways to effectively manage their environments as Windows PowerShell gains in popularity. Through the introduction of VMware PowerCLI, power users and developers are identifying new methods to rapidly develop new features to enhance their virtualization management capabilities. Learn how Vizioncore's Virtualization EcoShell can provide a Graphical Development platform for VMware PowerCLI and the vSphere Web Services SDK that simplifies the development effort required to create PowerShell-based management solutions that extend from the Hypervisor and deep into the Datacenter.  If you are an advanced administrator, beginning developer, or OEM provider trying to integrate with virtualization, be sure to check out how you can enhance your virtualization experience through the use of PowerCLI and Virtualization EcoShell.&lt;br /&gt;
&lt;b&gt;Level&lt;/b&gt; Intermediate</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powercli</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">ecoshell</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">coffee_talk_webinar</category>
      <pubDate>Wed, 22 Jul 2009 23:17:52 GMT</pubDate>
      <author>heyitspablo</author>
      <guid>http://communities.vmware.com/thread/222424</guid>
      <dc:date>2009-07-22T23:17:52Z</dc:date>
      <clearspace:dateToText>3 months, 2 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>Command execute multiple times</title>
      <link>http://communities.vmware.com/thread/221749</link>
      <description>&lt;br /&gt;
Hi&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
We are trying to create a simple scripts to build VMs from templates, modify the CD drives and power on the VMs.&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
What we get is the following lines repeat many times over and give lots of errors and sometimes not the desired result.&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
.....&lt;br /&gt;
&lt;p /&gt;
get-cddrive -VM $vcvm | set-cddrive -ISOPath $isopathdrec -StartConnected $true -Confirm:$false&lt;br /&gt;
New-CDDrive -VM $vcvm | set-cddrive -ISOPath $isopathesx4 -StartConnected $true -Confirm:$false&lt;br /&gt;
New-CDDrive -VM $vcvm | set-cddrive -ISOPath $isopathvim4 -StartConnected $true -Confirm:$false&lt;br /&gt;
start-vm -VM $vcvm -Confirm:$false&lt;br /&gt;
&lt;p /&gt;
........&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
I know these lines will achieve what I want - if they would just run once!&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Any help appreciated.&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Thanks, Andy.</description>
      <pubDate>Sat, 18 Jul 2009 12:58:24 GMT</pubDate>
      <author>avarcher</author>
      <guid>http://communities.vmware.com/thread/221749</guid>
      <dc:date>2009-07-18T12:58:24Z</dc:date>
      <clearspace:dateToText>4 months, 1 week ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>Setting Vlan on Vmotion Port Group</title>
      <link>http://communities.vmware.com/thread/220806</link>
      <description>I know i am missing something simple, just can't seem to figure out what it is...&lt;br /&gt;
&lt;br /&gt;
$vmkernelname = "VMKernel"&lt;br /&gt;
&lt;br /&gt;
Set-VirtualPortGroup -VirtualPortGroup $vmkernelname &lt;i&gt;-VLanId&lt;/i&gt; 343&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
gives a error of&lt;br /&gt;
&lt;br /&gt;
*Set-VirtualPortGroup : Cannot bind parameter 'VirtualPortGroup'. Cannot convert&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;br /&gt;
&lt;ul&gt;

&lt;ul&gt;
&lt;li&gt;value "VMKernel" to type "VMware.VimAutomation.Types.Host.VirtualPortGroup".&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
**rror: "Invalid cast from 'System.String' to 'VMware.VimAutomation.Types.Host.V&lt;br /&gt;
**rtualPortGroup'.&lt;br /&gt;
&amp;lt;strong&amp;lt;/p&amp;gt;&lt;br /&gt;
*+ $test = Set-VirtualPortGroup -VirtualPortGroup &amp;lt;&amp;lt;&amp;lt;&amp;lt; $vmkernelname -VLanId 34&lt;br /&gt;
&lt;b&gt;*3&lt;/b&gt;&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;
&lt;p /&gt;
&lt;p /&gt;
&lt;br /&gt;
what am i doing wrong?!&lt;br /&gt;
&lt;p /&gt;
Thanks!&lt;br /&gt;
&lt;br /&gt;
*</description>
      <pubDate>Mon, 13 Jul 2009 19:36:41 GMT</pubDate>
      <author>mealan</author>
      <guid>http://communities.vmware.com/thread/220806</guid>
      <dc:date>2009-07-13T19:36:41Z</dc:date>
      <clearspace:dateToText>4 months, 1 week ago</clearspace:dateToText>
      <clearspace:messageCount>2</clearspace:messageCount>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>How to set the annotations for an esx per cluster?</title>
      <link>http://communities.vmware.com/thread/218773</link>
      <description>Under the registercard configuration for an esx server in virtual center, then choosing "advanced configuration" in sofware section, there is a Option annotations with a field Annotations.WelcomeMessage.&lt;br /&gt;
&lt;br /&gt;
Can this be set through powershell ? &lt;br /&gt;
&lt;p /&gt;
I got this from this articel: &lt;br /&gt;
&lt;p /&gt;
&lt;a class="jive-link-external" href="http://www.run-virtual.com/?p=196"&gt;http://www.run-virtual.com/?p=196&lt;/a&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;Customizing the ESX 3i Main screen&lt;/b&gt;&lt;br /&gt;
Checking the advanced options list, I found one other nice option called Annotations. Here you can specify the &amp;lt;code&amp;gt;Annotations.WelcomeMessage&amp;lt;/code&amp;gt;. What ever message you type here will be displayed on the ESX 3i main screen (when not logged in), so you can specify who is responsible for this server or something creative like that.</description>
      <pubDate>Tue, 30 Jun 2009 20:16:43 GMT</pubDate>
      <author>meistermn</author>
      <guid>http://communities.vmware.com/thread/218773</guid>
      <dc:date>2009-06-30T20:16:43Z</dc:date>
      <clearspace:dateToText>4 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Storage vmotion to NFS datastore not working</title>
      <link>http://communities.vmware.com/thread/218429</link>
      <description>&lt;br /&gt;
I have a bit of a strange problem.  I've done 40+ SVM's to NFS using a third party GUI plugin and thats been fine.&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Now i need to move another 40 or so out of hours, so looked at doing it via powercli.&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;get-vm testvm | move-vm -datastore (get-datastore nfsdatastore)&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
Seems simple enough but it returns the following error &lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;Move-VM : 29/06/2009 12:50:47    Move-VM    71A411CD-7200-4369-BB2F-FE186F47108&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;7    The operation for the entity vm-54487 failed with the following message:&lt;/b&gt; &lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;" specified parameter was not correct. datastore"&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
&lt;b&gt;At line:1 char:35&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;+ get-vm testvm | move-vm  &amp;lt;&amp;lt;&amp;lt;&amp;lt; -datastore (get-datastore nfsdatastore)&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
It does work when moving to traditional LUN's and even local storage so its something to do with the NFS datastore.  I have read that SVM to NFS is not officially supported, is this something that anyone else has experienced however ?</description>
      <pubDate>Mon, 29 Jun 2009 12:27:00 GMT</pubDate>
      <author>Tigerstolly</author>
      <guid>http://communities.vmware.com/thread/218429</guid>
      <dc:date>2009-06-29T12:27:00Z</dc:date>
      <clearspace:dateToText>4 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>10</clearspace:messageCount>
      <clearspace:replyCount>9</clearspace:replyCount>
    </item>
    <item>
      <title>How to check the Connectionstate of the Webservice</title>
      <link>http://communities.vmware.com/thread/218400</link>
      <description>&lt;br /&gt;
Hello&lt;br /&gt;
&lt;p /&gt;
 My application uses the View object vmware.vim.VirtualMachine to powerON or powerOFF the Virtual Machine. If I initiate the methode when the Virtualcenter is down, the application hangs until the timeout is received.&lt;br /&gt;
&lt;p /&gt;
Is it possibe to check first if the Webservice is available?&lt;br /&gt;
&lt;p /&gt;
Regards&lt;br /&gt;
&lt;p /&gt;
 Manfred</description>
      <pubDate>Mon, 29 Jun 2009 08:53:02 GMT</pubDate>
      <author>manfred9999</author>
      <guid>http://communities.vmware.com/thread/218400</guid>
      <dc:date>2009-06-29T08:53:02Z</dc:date>
      <clearspace:dateToText>4 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>Get-VirtualSwitch available ports wierdness</title>
      <link>http://communities.vmware.com/thread/217389</link>
      <description>I'm running something like:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;$vmhost = Get-Host &amp;quot;myhost.whatever.com&amp;quot;
$switch = $vmhost | Get-VirtualSwitch 
$switch 
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;p /&gt;
Which on a couple of hosts seems to display a wildly inaccurate number for Num Hosts Available. On other hosts it works fine. On the two that do not work it's always displaying 59 (of 64 ports), which is a little odd as one of the hosts has 29 guests running on it as I type this. Anyone come across this before?</description>
      <pubDate>Tue, 23 Jun 2009 14:38:32 GMT</pubDate>
      <author>timparkinsonSheffield</author>
      <guid>http://communities.vmware.com/thread/217389</guid>
      <dc:date>2009-06-23T14:38:32Z</dc:date>
      <clearspace:dateToText>4 months, 4 days ago</clearspace:dateToText>
      <clearspace:messageCount>11</clearspace:messageCount>
      <clearspace:replyCount>10</clearspace:replyCount>
    </item>
    <item>
      <title>Clone VM using Powershell PowerCLi</title>
      <link>http://communities.vmware.com/thread/217212</link>
      <description>I'm trying to clone a vm from an existing virtual machine.  This VM is not setup as a template.  Normally from the console we just right click and click on clone... I'd like to automate this via powershell.  I'm using the script below that i found here on the forums but can't get it to work.  There are two errors that I'm getting so I'm not sure if there are more cause it kills the script.&lt;br /&gt;
&lt;br /&gt;
PS U:\scripts\powershell\VMWare&amp;gt; U:\scripts\powershell\VMWare\CloneVMnew.ps1&lt;br /&gt;
The term 'get-viserver' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again.&lt;br /&gt;
At U:\scripts\powershell\VMWare\CloneVMnew.ps1:19 char:13&lt;br /&gt;
+ get-viserver  &amp;lt;&amp;lt;&amp;lt;&amp;lt; -server $vcserver -user $vmuser -password $vmpassword -Protocol $vmprotocol&lt;br /&gt;
PS U:\scripts\powershell\VMWare&amp;gt; U:\scripts\powershell\VMWare\CloneVMnew.ps1&lt;br /&gt;
The term 'Find-EntityView' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again.&lt;br /&gt;
At U:\scripts\powershell\VMWare\CloneVMnew.ps1:22 char:22&lt;br /&gt;
+ $HS = Find-EntityView  &amp;lt;&amp;lt;&amp;lt;&amp;lt; -ViewType "HostSystem"&lt;br /&gt;
&lt;br /&gt;
I changed the Get-VIServer to Connect-VIServer and now it passes that point in the script.  It then gets to $HS and fails with the second error.&lt;br /&gt;
&lt;br /&gt;
Also there is a command for the target directory with the variable $target.  How is this possible if the folder has not been created?  I tried running a different script with similar parameters and it would fail because it couldn't find the folder.  What part of the script is actually creating the folder for the new clone?  Any help would be greatly appreciated.  &lt;br /&gt;
&lt;br /&gt;
The final script wil need to incorporate specifying a customization script for sysprep and also selecting a  Datastore for the VM&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
Thanks &lt;br /&gt;
&lt;br /&gt;
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ &lt;br /&gt;
Add-PSSnapin Vmware*&lt;br /&gt;
&lt;br /&gt;
#test vm clone script&lt;br /&gt;
&lt;br /&gt;
$ErrorActionPreference = "Stop"&lt;br /&gt;
&lt;br /&gt;
#variables&lt;br /&gt;
#VirtualCenter connection variables&lt;br /&gt;
$vcserver = "vcenter" #&amp;lt;vcserver&amp;gt;&lt;br /&gt;
$vmuser = "User" #&amp;lt;vmuser&amp;gt;&lt;br /&gt;
$vmpassword = "Password" #&amp;lt;vmpassword&amp;gt;&lt;br /&gt;
$vmprotocol = "HTTPS" # "HTTPS"&lt;br /&gt;
&lt;br /&gt;
#Virtual Machine to be created variables&lt;br /&gt;
$vmpool = "ITPool"&lt;br /&gt;
$vmname="testxpvm" #&amp;lt;virtual-machine-name-to-be-created&amp;gt;&lt;br /&gt;
$vmtemplate= "WinXPSP2_Baseline" #"xp-vdisk-template"&lt;br /&gt;
$vmfolder = "testxpvm" #parentfolder for new virtual machines (not full path)&lt;br /&gt;
&lt;br /&gt;
#connect to VirtualCenter with credentials&lt;br /&gt;
Connect-viserver -server $vcserver -user $vmuser -password $vmpassword -Protocol $vmprotocol&lt;br /&gt;
&lt;br /&gt;
#sets up vim object&lt;br /&gt;
$HS = Find-EntityView -ViewType "HostSystem"&lt;br /&gt;
&lt;br /&gt;
$vmrSpec = New-Object VMware.Vim.VirtualMachineRelocateSpec&lt;br /&gt;
$vmrSpec.transform = &lt;a class="jive-link-external" href="http://VMware.Vim.VirtualMachineRelocateTransformation::sparse"&gt;http://VMware.Vim.VirtualMachineRelocateTransformation::sparse&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
#setup resource pool&lt;br /&gt;
$pool = get-resourcepool $vmpool&lt;br /&gt;
$poolview = get-view $pool.id&lt;br /&gt;
$vmrSpec.pool = $poolview.moref&lt;br /&gt;
&lt;br /&gt;
$vmcSpec = New-Object VMware.Vim.VirtualMachineCloneSpec&lt;br /&gt;
$vmcSpec.location = $vmrspec&lt;br /&gt;
$vmcSpec.powerOn = $false&lt;br /&gt;
$vmcSpec.template = $false&lt;br /&gt;
&lt;br /&gt;
#get storage folder&lt;br /&gt;
$target = Get-Folder $vmfolder&lt;br /&gt;
$targetview = get-view $target.ID&lt;br /&gt;
&lt;br /&gt;
#get template&lt;br /&gt;
$vmmor = Get-VM -name $vmtemplate  #Get-Template -Name $vmtemplate&lt;br /&gt;
$vmmorview = get-view $vmmor.id #Get-View (Get-VM -name "WinXPSP2_Baseline").id&lt;br /&gt;
&lt;br /&gt;
#clone&lt;br /&gt;
$task = $vmmorview.CloneVM_Task($targetview.MoRef,$vmname, $vmcSpec )&lt;br /&gt;
#wait-task $task.value&lt;br /&gt;
&lt;br /&gt;
Write-Output "Finished"&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++</description>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powercli</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">powershell</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">clone</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">cloning</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">vm</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">virtual</category>
      <category domain="http://communities.vmware.com/tags?communityID=2530">machine</category>
      <pubDate>Mon, 22 Jun 2009 19:39:36 GMT</pubDate>
      <author>Damianini</author>
      <guid>http://communities.vmware.com/thread/217212</guid>
      <dc:date>2009-06-22T19:39:36Z</dc:date>
      <clearspace:dateToText>5 months, 3 days ago</clearspace:dateToText>
      <clearspace:messageCount>7</clearspace:messageCount>
      <clearspace:replyCount>6</clearspace:replyCount>
    </item>
    <item>
      <title>Strange cpu/mem slot on guest</title>
      <link>http://communities.vmware.com/thread/215995</link>
      <description>&lt;br /&gt;
Hi all&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
I downloaded a script from &lt;a class="jive-link-external" href="http://www.peetersonline.nl/"&gt;http://www.peetersonline.nl/&lt;/a&gt; calles get-haclustersize.ps1&lt;br /&gt;
&lt;p /&gt;
The script uncoveres any reason for getting errors when configuring ha.&lt;br /&gt;
&lt;p /&gt;
In my case, the result was this:&lt;br /&gt;
&lt;br /&gt;
=================================&lt;br /&gt;
Your heaviest VM in terms of CPU usage is considered to be:&lt;br /&gt;
&lt;br /&gt;
Name        CPUSlot MemSlot&lt;br /&gt;
----&lt;hr /&gt;
-------&lt;br /&gt;
XXXXXXXXXX    1024     816&lt;br /&gt;
&lt;p /&gt;
Your heaviest VM in terms of Memory usage is considered to be:&lt;br /&gt;
&lt;br /&gt;
Name        CPUSlot MemSlot&lt;br /&gt;
----&lt;hr /&gt;
-------&lt;br /&gt;
XXXXXXXXXX    1024     816&lt;br /&gt;
&lt;p /&gt;
Your cluster has the following VMHosts:&lt;br /&gt;
&lt;br /&gt;
Name                    CPU CPUSlots Memory MemSlots&lt;br /&gt;
&lt;ul class="jive-dash"&gt;

&lt;ul class="jive-dash"&gt;

&lt;ul class="jive-dash"&gt;

&lt;ul class="jive-dash"&gt;
&lt;li&gt;---&lt;hr /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
------&lt;hr /&gt;
esx06.afgruppen.intra 38401       37  65533       80&lt;br /&gt;
esx07.afgruppen.intra 38401       37  65533       80&lt;br /&gt;
esx08.afgruppen.intra 38401       37  65533       80&lt;br /&gt;
esx09.afgruppen.intra 38401       37  65533       80&lt;br /&gt;
&lt;p /&gt;
If you should lose your heaviest VMHost, you would have left:&lt;br /&gt;
Number of CPU slots:    111&lt;br /&gt;
Number of memory slots: 240&lt;br /&gt;
&lt;br /&gt;
Your current Failover Level is: 0 VMHosts&lt;br /&gt;
You should have room for another 46 vms, while maintaining a failover level of 1&lt;br /&gt;
&lt;hr /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Name                 CPUSlot       MemSlot&lt;br /&gt;
----&lt;hr /&gt;
&lt;hr /&gt;
XXXXXXXXXX    1024              816 &lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Considering that my clusters total is 37*4 and 80*4 something is wrong&lt;br /&gt;
&lt;p /&gt;
 The guest is a Windows 2008 X64 4vCPU 12GB RAM running exchange 2007 SP1 Mailbox role&lt;br /&gt;
&lt;p /&gt;
Anyone who can tell me why i'm getting this result? &lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
Kristian</description>
      <pubDate>Tue, 16 Jun 2009 14:47:09 GMT</pubDate>
      <author>dock</author>
      <guid>http://communities.vmware.com/thread/215995</guid>
      <dc:date>2009-06-16T14:47:09Z</dc:date>
      <clearspace:dateToText>5 months, 1 week ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>.Net Web App Problem Using PowerShell</title>
      <link>http://communities.vmware.com/thread/215991</link>
      <description>&lt;br /&gt;
I have several .net-based web apps running powershell code with various snapins. Currently because powershell was apparently thought of as a command-line tool, to run under a MS web app, an application pool must be configured with domain credentials of a 'service account' so that the underlying providers run under credentials. With the VMWare VI Toolkit installed and the 'service account' configured on the pool that has rights in vCenter, it will not work on a production web server (it does work on the dev server because the web browser is running on the same machine as the web server and credentials are passed through) even though credentials are being specified in the 'connect-viserver' line with -user userid -password password and the account is a local admin on the web server.&lt;br /&gt;
&lt;p /&gt;
This configuration (service account that has rights in the target powershell object and is a local admin on the web server) works fine except with the VI Toolkit powershell providers. &lt;br /&gt;
&lt;p /&gt;
Another oddity is that if the pool is configured with MY domain account, it will work, and if the credentials of the 'service account' are specified in the 'connect-viserver' line, the code returns only what that account has rights to see. If I specify MY credentials in the 'connect-viserver' line it returns what I have rights to see. I can run the commands fine manually from the command-prompt when logged into the web server as the service account.&lt;br /&gt;
&lt;p /&gt;
There are no errors generated in the eventlog, web logs, or anywhere else on the server. The 'providers' and 'engine' all startup fine in the powershell eventlog, then stop. The code appears to not run the connect-viserver line correctly, becasue the error trapped by the web code errors on the line 'get-vm' which states: "Get-VM You are not currently connected to any servers. Please connect first using Connect-VIServer or one of its aliases"&lt;br /&gt;
&lt;p /&gt;
Here is the web code:&lt;br /&gt;
&lt;p /&gt;
Public Shared Sub GetVMs(ByVal Controller As String, ByRef resultObject As System.Collections.ObjectModel.Collection(Of System.Management.Automation.PSObject), ByRef errtxt As String, ByVal IDToUse As String, ByVal PasswordToUse As String)&lt;br /&gt;
&lt;p /&gt;
Dim myRunSpace As Runspace&lt;br /&gt;
&lt;p /&gt;
Dim rsConfig As RunspaceConfiguration = RunspaceConfiguration.Create()&lt;br /&gt;
&lt;p /&gt;
Dim snapInException As New PSSnapInException&lt;br /&gt;
&lt;p /&gt;
Dim info As PSSnapInInfo&lt;br /&gt;
&lt;p /&gt;
info = rsConfig.AddPSSnapIn("VMware.VimAutomation.Core", snapInException)&lt;br /&gt;
&lt;p /&gt;
myRunSpace = RunspaceFactory.CreateRunspace(rsConfig)&lt;br /&gt;
&lt;p /&gt;
myRunSpace.Open()&lt;br /&gt;
&lt;p /&gt;
Dim enumD As New StringBuilder&lt;br /&gt;
&lt;p /&gt;
enumD.AppendLine("$visvr = Connect-VIServer -Server " &amp;#38; Controller &amp;#38; " -User " &amp;#38; IDToUse &amp;#38; " -Password " &amp;#38; PasswordToUse)&lt;br /&gt;
&lt;p /&gt;
enumD.AppendLine("get-vm")&lt;br /&gt;
&lt;p /&gt;
Dim pipe As Pipeline = myRunSpace.CreatePipeline()&lt;br /&gt;
&lt;p /&gt;
pipe.Commands.AddScript(enumD.ToString)&lt;br /&gt;
&lt;p /&gt;
Try&lt;br /&gt;
&lt;p /&gt;
resultObject = pipe.Invoke()&lt;br /&gt;
&lt;p /&gt;
Catch ex As Exception&lt;br /&gt;
&lt;p /&gt;
errtxt = ex.InnerException.Message.ToString &amp;#38; "&amp;lt;BR&amp;gt;" &amp;#38; ex.TargetSite.ToString &amp;#38; "&amp;lt;BR&amp;gt;" &amp;#38; ex.Source.ToString&lt;br /&gt;
&lt;p /&gt;
End Try&lt;br /&gt;
&lt;p /&gt;
myRunSpace.Close()&lt;br /&gt;
&lt;p /&gt;
End Sub</description>
      <pubDate>Tue, 16 Jun 2009 14:16:58 GMT</pubDate>
      <author>blakef</author>
      <guid>http://communities.vmware.com/thread/215991</guid>
      <dc:date>2009-06-16T14:16:58Z</dc:date>
      <clearspace:dateToText>4 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>plink script + return value</title>
      <link>http://communities.vmware.com/thread/214176</link>
      <description>&lt;br /&gt;
I have some plink scripts for stuff the vitoolkit can handle.&lt;br /&gt;
To get the outcome of a particular command i  do the following:&lt;br /&gt;
&lt;p /&gt;
invoke expression $COMMAND | out-string&lt;br /&gt;
&lt;p /&gt;
But i am searching for a way to get the access denied message. The method above doesn give me an output.</description>
      <pubDate>Mon, 08 Jun 2009 06:16:47 GMT</pubDate>
      <author>RobMokkink</author>
      <guid>http://communities.vmware.com/thread/214176</guid>
      <dc:date>2009-06-08T06:16:47Z</dc:date>
      <clearspace:dateToText>5 months, 2 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Configuring automatic startup with perl in VIMA</title>
      <link>http://communities.vmware.com/thread/212748</link>
      <description>I have 3 ESXi hosts running in a vCenter cluster.  I need to configure the virtual machines on them to start up automatically as they could potentially be shut down by a UPS.&lt;br /&gt;
&lt;br /&gt;
I have HA enabled which should start VMs up automatically but the only problem is that th vCenter and supporting SQL Server are virtual machines in the cluter they are managing.  Automatic startup (configured on the host) and HA do not play well together.  Configuring auto startup in a HA cluster causes errors when vmotioning.  HA coming online removes the auto start configuration from the hosts.  That second part can work to my advantage if I can configure auto start when the cluster is being shut down, bring the SQL and vCenter back online and let HA take care of the other VMs and removing auto start.&lt;br /&gt;
&lt;br /&gt;
Shutdown is handled by a lamws upsVIShutdown.pl/ghettoShutdown.pl scripts.&lt;br /&gt;
&lt;br /&gt;
Extending upsVIShutdown.pl looks like it should be simple, but I'm not too familiar with the API.  Does anyone know how I can create an instance of a VM object by passing a VM name? (All the scripts I've seen so far simply iterate through a list of all VMs) and how to configure automatic startup delays on the VM object?  And presumably I would need to enable virtual machines starting up and shutting down with the host?&lt;br /&gt;
&lt;br /&gt;
Any help would be greatly appreciated</description>
      <pubDate>Mon, 01 Jun 2009 13:03:38 GMT</pubDate>
      <author>dsnowden</author>
      <guid>http://communities.vmware.com/thread/212748</guid>
      <dc:date>2009-06-01T13:03:38Z</dc:date>
      <clearspace:dateToText>5 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>differnces between vMA to vSphere CLI</title>
      <link>http://communities.vmware.com/thread/211583</link>
      <description>&lt;p /&gt;
Hi,&lt;br /&gt;
&lt;p /&gt;
what's the difference in terms on functionality between vMA to vSphere CLI&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
Itzik</description>
      <pubDate>Sun, 24 May 2009 10:31:50 GMT</pubDate>
      <author>Itzikr</author>
      <guid>http://communities.vmware.com/thread/211583</guid>
      <dc:date>2009-05-24T10:31:50Z</dc:date>
      <clearspace:dateToText>4 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>4</clearspace:messageCount>
      <clearspace:replyCount>3</clearspace:replyCount>
    </item>
    <item>
      <title>Connecting to VC on port 8080 with get-viServer</title>
      <link>http://communities.vmware.com/thread/211582</link>
      <description>&lt;br /&gt;
I'm trying to use PowerCLI to connect to our VC but the http port on our VC is 8080 instead of 80, how can I specify another http port in the command&lt;br /&gt;
&lt;p /&gt;
 Get-VIServer -Server 192.168.10.10 -Protocol http -User admin -Password sck9p84 &lt;br /&gt;
&lt;p /&gt;
 I also tried using https but get the following error;&lt;br /&gt;
&lt;p /&gt;
I tried specifiying port 8080 &lt;br /&gt;
&lt;p /&gt;
 PS C:\Program Files\VMware\Infrastructure\VIToolkitForWindows&amp;gt; get-vIServer -server hk-vcwn001 -port 8080 -user administrator -password XXX&lt;br /&gt;
Get-VIServer : Specified argument was out of the range of valid values.&lt;br /&gt;
At line:1 char:13 &lt;br /&gt;
+ get-vIServer  &amp;lt;&amp;lt;&amp;lt;&amp;lt; -server hk-vpcwn001 -port 8080 -user administrator -passwordxxxx&lt;br /&gt;
&lt;p /&gt;
and then tried https &lt;br /&gt;
&lt;p /&gt;
PS C:\Program Files\VMware\Infrastructure\VIToolkitForWindows&amp;gt; get-vIServer -serer hk-vcwn001 -protocol https -user administrator -password xxxx&lt;br /&gt;
&lt;p /&gt;
There were one or more problems with the server certificate:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;A certification chain processed correctly, but terminated in a root certificat which isn't trusted by the trust provider.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;The certificate's CN name does not match the passed value. &lt;/li&gt;
&lt;/ul&gt;
&lt;p /&gt;
 Many thanks</description>
      <pubDate>Sun, 24 May 2009 09:42:52 GMT</pubDate>
      <author>zenomorph</author>
      <guid>http://communities.vmware.com/thread/211582</guid>
      <dc:date>2009-05-24T09:42:52Z</dc:date>
      <clearspace:dateToText>6 months, 2 days ago</clearspace:dateToText>
      <clearspace:messageCount>12</clearspace:messageCount>
      <clearspace:replyCount>11</clearspace:replyCount>
    </item>
    <item>
      <title>Welcome to our vSphere CLI Community</title>
      <link>http://communities.vmware.com/thread/211362</link>
      <description>We created a dedicated community for vSphere command line interface topics. We welcome you to participate by sharing your ideas, providing feedback and helping us grow our community. &lt;br /&gt;
&lt;br /&gt;
Regards</description>
      <pubDate>Fri, 22 May 2009 14:06:45 GMT</pubDate>
      <author>heyitspablo</author>
      <guid>http://communities.vmware.com/thread/211362</guid>
      <dc:date>2009-05-22T14:06:45Z</dc:date>
      <clearspace:dateToText>3 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>13</clearspace:messageCount>
      <clearspace:replyCount>12</clearspace:replyCount>
    </item>
    <item>
      <title>how to get-vm from host and migrate one-by-one</title>
      <link>http://communities.vmware.com/thread/211285</link>
      <description>&lt;br /&gt;
I am trying to get-vm from host (in a cluster) and move/vmotion vms from one host to other hosts, i suppose something similar to this one:  &lt;br /&gt;
&lt;p /&gt;
get-cluster -name blah | get-vmhost -name blah-blah | get-vm (I suppose I need to dump to a text array_list_vms etc.) then; &lt;br /&gt;
&lt;p /&gt;
while (array_list_vms != NULL) {&lt;br /&gt;
&lt;p /&gt;
     move-vm -name (get_name from array_list_vms) -destination (get-cluster -name blah) confirm:$false  &lt;br /&gt;
&lt;p /&gt;
}&lt;br /&gt;
&lt;p /&gt;
What makes this difficult for me is part to read from get-vm content, and moving each VM and then array_list_vms count -1 to reduce VM list etc. &lt;br /&gt;
&lt;p /&gt;
Thanks in advance.</description>
      <pubDate>Fri, 22 May 2009 05:11:21 GMT</pubDate>
      <author>bubunia</author>
      <guid>http://communities.vmware.com/thread/211285</guid>
      <dc:date>2009-05-22T05:11:21Z</dc:date>
      <clearspace:dateToText>6 months, 18 hours ago</clearspace:dateToText>
      <clearspace:messageCount>6</clearspace:messageCount>
      <clearspace:replyCount>5</clearspace:replyCount>
    </item>
    <item>
      <title>trying to get lists of VMs from Host within Cluster and dump into text and compare number of VMs per hosts</title>
      <link>http://communities.vmware.com/thread/211192</link>
      <description>&lt;br /&gt;
I am trying to come up with number of hosts in a cluster and VMs in these hosts, then dump into txt file and then do comparison etc.&lt;br /&gt;
&lt;p /&gt;
Something like this:&lt;br /&gt;
&lt;p /&gt;
$activeCluster = Get-Cluster |where {$_.DrsEnabled -like "True"}&lt;br /&gt;
&lt;p /&gt;
$myHosts =  $activeCluster | get-vmhost&lt;br /&gt;
&lt;p /&gt;
$VMs = $myHosts|get-vm # using select name, host (but somehow I could not split/separate nicely number of VMs per host)&lt;br /&gt;
&lt;p /&gt;
 and then dump into txt file Out-File c:\tmp\file.txt &lt;br /&gt;
&lt;p /&gt;
then get-content C:\tmp\file.txt to do some comparison and based on how many VMs per each host, to balance hosts with ~equal amount of VMs using move-vm option.&lt;br /&gt;
&lt;p /&gt;
Basically, point of this would be not to allow any of the host to have way more VMs compare to other hosts etc.&lt;br /&gt;
&lt;p /&gt;
Any help is appreciated. Thanks.</description>
      <pubDate>Thu, 21 May 2009 17:19:27 GMT</pubDate>
      <author>bubbzie</author>
      <guid>http://communities.vmware.com/thread/211192</guid>
      <dc:date>2009-05-21T17:19:27Z</dc:date>
      <clearspace:dateToText>6 months, 6 days ago</clearspace:dateToText>
      <clearspace:messageCount>5</clearspace:messageCount>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>How to Synchronize baselines for Update Manager between two VC?</title>
      <link>http://communities.vmware.com/thread/210960</link>
      <description>&lt;br /&gt;
How to synchronize baselines for Update Manager between two VC?&lt;br /&gt;
&lt;p /&gt;
Hello:&lt;br /&gt;
&lt;p /&gt;
I am wondering if someone have the script that will help me synchronize two baselines (with the same name) for VMware Update Manager on two VCs...&lt;br /&gt;
&lt;p /&gt;
I know that I can delete baseline on my "destination" VC and export/import baseline from source VC, but I need to keep baseline on destination otherwise I have to attach it again to all my ESXs... That means that I have to synch my two baselines someway... &lt;br /&gt;
&lt;p /&gt;
Any help will be really appreciated.&lt;br /&gt;
&lt;p /&gt;
Thanks,&lt;br /&gt;
&lt;p /&gt;
olegarr</description>
      <pubDate>Wed, 20 May 2009 16:20:09 GMT</pubDate>
      <author>olegarr</author>
      <guid>http://communities.vmware.com/thread/210960</guid>
      <dc:date>2009-05-20T16:20:09Z</dc:date>
      <clearspace:dateToText>6 months, 1 week ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>Error mounting CDROM from VIMA client</title>
      <link>http://communities.vmware.com/thread/210772</link>
      <description>&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
When attempting to mount CDROM from VIMA client I get errors&lt;br /&gt;
&lt;p /&gt;
end -request: I/O error, dev hda, sector 64&lt;br /&gt;
&lt;p /&gt;
Isofs-fill-super: bread failed, dev-hda, iso_blknum=16, block=16&lt;br /&gt;
&lt;p /&gt;
Mount: wrong fs type, bad option, bad superblock on /dev/cdrom,&lt;br /&gt;
&lt;p /&gt;
Missing codepage or other error&lt;br /&gt;
&lt;p /&gt;
The mount command used is &lt;br /&gt;
&lt;p /&gt;
sudo mount -t iso9660 /dev/cdrom /mnt/cdrom &lt;br /&gt;
&lt;p /&gt;
 I have attached screen shot of error along with the mesg file&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;br /&gt;</description>
      <pubDate>Tue, 19 May 2009 20:37:19 GMT</pubDate>
      <author>wnp1</author>
      <guid>http://communities.vmware.com/thread/210772</guid>
      <dc:date>2009-05-19T20:37:19Z</dc:date>
      <clearspace:dateToText>6 months, 1 week ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Device Datastore per Host from VCDB</title>
      <link>http://communities.vmware.com/thread/209825</link>
      <description>This may not be the right place to post this, I'm trying to rewrite some code that is in powershell using the vi-toolkit, to instead be in powershell going directly to the VCDB. In case you are wondering why, this is part of a larger script that runs too slowly. This is the last piece to convert to go to the DB directly.&lt;br /&gt;
&lt;br /&gt;
The information I am after is what Virtual Center displays in the "Configuration ...Storage Panel". In particular the "IDENTIFICATION" column and the matching "DEVICE" (vmhba) column. &lt;br /&gt;
&lt;br /&gt;
Here is a powershell script that gathers this information: &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;
function FillDatastoreLookupTable () {
	Write-Host &amp;quot;Function: FillDatastoreLookupTable&amp;quot;
	foreach ($h in $HostTable.keys) {
		$hss = Get-View (Get-View (Get-VMHost -Name $h).ID).ConfigManager.StorageSystem
		foreach($mount in $hss.FileSystemVolumeInfo.MountInfo){
  			if($mount.Volume.Type -eq &amp;quot;VMFS&amp;quot;){
    			foreach($ext in $mount.Volume.Extent){
      				foreach($lun in $hss.StorageDeviceInfo.MultipathInfo.Lun){
	   		 			if($lun.Id -eq $ext.DiskName) {break}
	  				}
					
					Write-Host $h $ext.DiskName $mount.Volume.Name
				}
  			}
		}
	}
}
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;p /&gt;
I've come close to duplicating this going directly to the VCDB. The only place I can find the VMHBA infromation stored with the Datastore identification is in the XML text contained with the INFO column of the VPX_Datastore table. If this cross-reference of information VMHBA to Datastore is located somewhere else that would be VERY HELPFUL to know.&lt;br /&gt;
&lt;br /&gt;
Here is the code to extract it out of the INFO column:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;
function FillDatastoreLookupTable () {
	Write-Host &amp;quot;Function: FillDatastoreLookupTable&amp;quot;
	$SqlCmd 					= New-Object System.Data.SqlClient.SqlCommand
	$SqlCmd.CommandText 		= &amp;quot;SELECT name, Info FROM dbo.VPX_DATASTORE where type = 'vmfs'&amp;quot;	 
	$SqlCmd.Connection 			= $SqlConnection
	$SqlAdapter 				= New-Object System.Data.SqlClient.SqlDataAdapter
	$SqlAdapter.SelectCommand 	= $SqlCmd
	$DataSet 					= New-Object System.Data.DataSet
	$SqlAdapter.Fill($DataSet)  | out-null
	$dsinfo = $DataSet.Tables[0] 
	
	foreach ($row in $dsinfo) {
		$doc = [xml] (&amp;quot;&amp;lt;root xmlns:xsi='urn:dummy'&amp;gt;&amp;quot; + $row.info + &amp;quot;&amp;lt;/root&amp;gt;&amp;quot;)
		($doc.root.obj.vmfs) | % {
			$_.extent | % {
				$DatastoreLookupTable.add($_.diskname, $row.name)  | Out-Null
			}
		}
	}
}

&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Any suggestions would be appreciated.</description>
      <pubDate>Wed, 13 May 2009 19:06:46 GMT</pubDate>
      <author>dloop2</author>
      <guid>http://communities.vmware.com/thread/209825</guid>
      <dc:date>2009-05-13T19:06:46Z</dc:date>
      <clearspace:dateToText>6 months, 2 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Exception while creating customization package.</title>
      <link>http://communities.vmware.com/thread/209793</link>
      <description>Hello,  I am putting together a bulk clone from template script using many of the PS methods posted around here. However am currently stuck with the following problem. VM provisions from template fine, but customizaton fails with that age-old "Customization Failed" error in Virtual Center, after the VM disk has been provisioned. This is what VPXD logs tell me.  I am on PS1.0 and the 1.5 toolkit. I've seen many of the other posts around here and aware of the previous issues with new-VM and templates. So 'm actually using a method similar to &lt;a class="jive-link-external" href="http://communities.vmware.com/thread/146347?tstart=0"&gt;posted here&lt;/a&gt; and also building the vmclonespec manually. e.g.:&lt;br /&gt;
&lt;br /&gt;
$vmclonespec.Customization.GlobalIPSettings = New-Object VMware.Vim.CustomizationGlobalIPSettings&lt;br /&gt;
$vmclonespec.Customization.Options = New-Object  VMware.Vim.CustomizationWinOptions&lt;br /&gt;
$vmclonespec.Customization.Identity = New-Object VMware.Vim.CustomizationSysprep&lt;br /&gt;
$vmclonespec.Customization.Identity.GuiUnattended = New-Object VMware.Vim.CustomizationGuiUnattended&lt;br /&gt;
$vmclonespec.Customization.Identity.GuiUnattended.Password = New-Object VMware.Vim.CustomizationPassword&lt;br /&gt;
$vmclonespec.Customization.Identity.Identification = New-Object VMware.Vim.CustomizationIdentification&lt;br /&gt;
$vmclonespec.Customization.Identity.Identification.DomainAdminPassword = New-Object VMware.Vim.CustomizationPassword&lt;br /&gt;
$vmclonespec.Customization.Identity.UserData = New-Object VMware.Vim.CustomizationUserData&lt;br /&gt;
$vmclonespec.Customization.Identity.UserData.ComputerName = New-Object VMware.Vim.CustomizationFixedName&lt;br /&gt;
$vmclonespec.Customization.Identity.LicenseFilePrintData = New-Object  VMware.Vim.CustomizationLicenseFilePrintData&lt;br /&gt;
$vmclonespec.Customization.Identity.LicenseFilePrintData.AutoMode = New-Object  VMware.Vim.CustomizationLicenseDataMode&lt;br /&gt;
$vmclonespec.config = New-Object VMware.Vim.VirtualMachineConfigSpec&lt;br /&gt;
$vmclonespec.location = New-Object VMware.Vim.VirtualMachineRelocateSpec &lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;
My script logic is all fine, I think, just something stupid going on with sysprep setup.&lt;br /&gt;
Who can give me the latest tip?  &lt;img src="http://communities.vmware.com/images/emoticons/blush.gif" alt="http://communities.vmware.com/images/emoticons/blush.gif" class="jive-image"  /&gt;  &lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
2009-05-14 00:54:51.686 'App' 3760 verbose] &lt;a class="jive-link-external" href="http://communities.vmware.com/community-document-picker.jspa?communityID=&amp;#38;subject=clone"&gt;clone&lt;/a&gt; (2K3_UNIPROC_ENT_V2.2) Customizing the destination VM&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 info-- hostVersion = 3.5.0, tools version = 7300&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 info-- hostVersion = 3.5.0, tools version = 7300&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 info-- Sysprep options: -quiet -mini -reseal -reboot&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 info-- Successfully created file C:\WINDOWS\TEMP\imc2BA6.tmp&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 verbose-- Setting param Unattended.OemSkipEula to value Yes&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 verbose-- Setting param Unattended.InstallFilesPath to value \sysprep\i386&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 verbose-- Setting param GuiUnattended.OemSkipWelcome to value 1&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 verbose-- Setting param GuiUnattended.OEMSkipRegional to value 1&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 verbose-- Setting param Networking.InstallDefaultComponents to value Yes&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 verbose-- Setting param GuiUnattended.TimeZone to value 225&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 verbose-- Setting param GuiUnattended.AutoLogon to value Yes&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 verbose-- Setting param GuiUnattended.AutoLogonCount to value 1&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 verbose-- Setting param GuiUnattended.AdminEncryptedPassword to value xxxxx&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 verbose-- Setting param UserData.FullName to value xxxx&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 verbose-- Setting param UserData.OrgName to value xxx&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 verbose-- Setting param UserData.ProductKey to value xxxx&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 verbose-- Setting param UserData.ComputerName to value TestVM1&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 verbose-- Setting param Identification.JoinWorkgroup to value WORKGROUP&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 verbose-- Setting param LicenseFilePrintData.AutoMode to value perSeat&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 error-- Exception while creating customization package.&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 info-- Successfully deleted file/directory C:\WINDOWS\TEMP\imc2BA6.tmp&lt;br /&gt;
--2009-05-14 00:54:51.686 'App' 3760 error-- &lt;a class="jive-link-external" href="http://communities.vmware.com/community-document-picker.jspa?communityID=&amp;#38;subject=clone"&gt;clone&lt;/a&gt; (2K3_UNIPROC_ENT_V2.2) Unexpected exception (vim.fault.CustomizationFault) during clone. Aborting.&lt;br /&gt;
&lt;br /&gt;
Message was edited by: kimono  --- sorry bad formatting. This editor still annoys me!</description>
      <pubDate>Wed, 13 May 2009 17:05:33 GMT</pubDate>
      <author>kimono</author>
      <guid>http://communities.vmware.com/thread/209793</guid>
      <dc:date>2009-05-13T17:05:33Z</dc:date>
      <clearspace:dateToText>6 months, 1 week ago</clearspace:dateToText>
      <clearspace:messageCount>2</clearspace:messageCount>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>VI Toolkit 1.5 / Visual Basic 2008: Passthrough Authentication?</title>
      <link>http://communities.vmware.com/thread/209575</link>
      <description>&lt;br /&gt;
Hi everybody,&lt;br /&gt;
&lt;p /&gt;
 I use VI Toolkit 1.5 / .NET together with Visual Basic 2008 (no PowerShell) to set up maintenance applications for our rather large ESX environment, which works quite smooth with dialog applications where the users are queried for their login credentials first which are then used to login to the VC server.&lt;br /&gt;
&lt;p /&gt;
 Now I need to create some batch applications  - unfortunately I found no easy way so far to use some kind of passthrough authentication (use the logon credentials of the current user context and pass them on to VC to get authenticated without manually entering or hard coding credential data).&lt;br /&gt;
&lt;p /&gt;
Does anybody know how to do this? Thanks very much for every hint or code sample...</description>
      <pubDate>Tue, 12 May 2009 17:18:09 GMT</pubDate>
      <author>Abacus99</author>
      <guid>http://communities.vmware.com/thread/209575</guid>
      <dc:date>2009-05-12T17:18:09Z</dc:date>
      <clearspace:dateToText>6 months, 2 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>1</clearspace:messageCount>
    </item>
    <item>
      <title>VI toolkit Extensions - Get-TkeLogLastModifiedDate</title>
      <link>http://communities.vmware.com/thread/209084</link>
      <description>Hi I'm trying to run &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;get-vm | Get-TkeLogLastModifiedDate
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
but i only get one VM returned&lt;br /&gt;
&lt;p /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;[VI Toolkit] C:\scripts&amp;gt; get-vm | Get-TkeLogLastModifiedDate

Name                                                        LogLastModifiedDate
----                                                        -------------------
VSV-SQL-TAA                                                 01/01/0001 00:00:00
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;p /&gt;
any ideas?&lt;br /&gt;
&lt;br /&gt;
(at first this function wouldn't run I think it was trying to call a function called get-datastorefiles which doesn't exist in the latest TKE Module dated 2nd May, I did find it in an older version of the extensions so I copied it over and it now runs)</description>
      <pubDate>Fri, 08 May 2009 15:02:43 GMT</pubDate>
      <author>houghtp</author>
      <guid>http://communities.vmware.com/thread/209084</guid>
      <dc:date>2009-05-08T15:02:43Z</dc:date>
      <clearspace:dateToText>6 months, 2 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>3</clearspace:messageCount>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>vmware Tools Update script</title>
      <link>http://communities.vmware.com/thread/207746</link>
      <description>Iwith Update 4 fully tested in our build environment we hope to update our systems.&lt;br /&gt;
&lt;br /&gt;
need to script the vmware tool update. &lt;br /&gt;
&lt;p /&gt;
I really need 2 scripts &lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;1 ) To upgrade vmwaretool on all virtual machines resource pool by resource pool and reboot with a 5 second interval....&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;2) To upgrade vmwaretool on all virtual machines resource pool by resource pool with NO REBOOT&lt;/b&gt;&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
I know this has been discussed in the past but cannot seem to get it work</description>
      <pubDate>Thu, 30 Apr 2009 13:44:09 GMT</pubDate>
      <author>gboskin</author>
      <guid>http://communities.vmware.com/thread/207746</guid>
      <dc:date>2009-04-30T13:44:09Z</dc:date>
      <clearspace:dateToText>6 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>2</clearspace:messageCount>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>How do I run this script in DMZ</title>
      <link>http://communities.vmware.com/thread/207596</link>
      <description>The vcserver is on the production network and the script work on there OK but does not get and of the server in the DMZ.&lt;br /&gt;
I can not run it from the DMZ as does not have access to the vcserver.&lt;br /&gt;
Is the only way to open a port?&lt;br /&gt;
&lt;p /&gt;
#Get VMware Disk Usage&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Created by Hugo Peeters&lt;/li&gt;
&lt;li&gt;&lt;a class="jive-link-external" href="http://www.peetersonline.nl"&gt;http://www.peetersonline.nl&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;VARIABLES&lt;/li&gt;
&lt;/ol&gt;
$Decimals = 1&lt;br /&gt;
$VCServer = “xxxxxxxx”&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;SCRIPT&lt;/li&gt;
&lt;li&gt;Connect to VC&lt;/li&gt;
&lt;/ol&gt;
Write-Progress “Gathering Information” “Connecting to Virtual Center” -Id 0&lt;br /&gt;
$VC = Connect-VIServer $VCServer&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Create Output Collection&lt;/li&gt;
&lt;/ol&gt;
$myCol = @()&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;List Datastores (Datastore Name)&lt;/li&gt;
&lt;/ol&gt;
Write-Progress “Gathering Information” “Listing Datastores” -Id 0&lt;br /&gt;
$Datastores = Get-Datastore | Sort Name&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;List vms&lt;/li&gt;
&lt;/ol&gt;
Write-Progress “Gathering Information” “Listing VMs and Disk Files” -Id 0&lt;br /&gt;
$VMSummaries = @()&lt;br /&gt;
ForEach ($vm in (Get-VM))&lt;br /&gt;
{&lt;br /&gt;
$VMView = $VM | Get-View&lt;br /&gt;
ForEach ($VirtualSCSIController in ($VMView.Config.Hardware.Device | Where {$_.DeviceInfo.Label -match “SCSI Controller”}))&lt;br /&gt;
{&lt;br /&gt;
ForEach ($VirtualDiskDevice in ($VMView.Config.Hardware.Device | Where {$_.ControllerKey -eq $VirtualSCSIController.Key}))&lt;br /&gt;
{&lt;br /&gt;
$VMSummary = “” | Select VM, HostName, PowerState, DiskFile, DiskName, DiskSize, SCSIController, SCSITarget&lt;br /&gt;
$VMSummary.VM = $VM.Name&lt;br /&gt;
$VMSummary.HostName = $VMView.Guest.HostName&lt;br /&gt;
$VMSummary.PowerState = $VM.PowerState&lt;br /&gt;
$VMSummary.DiskFile = $VirtualDiskDevice.Backing.FileName&lt;br /&gt;
$VMSummary.DiskName = $VirtualDiskDevice.DeviceInfo.Label&lt;br /&gt;
$VMSummary.DiskSize = $VirtualDiskDevice.CapacityInKB * 1KB&lt;br /&gt;
$VMSummary.SCSIController = $VirtualSCSIController.BusNumber&lt;br /&gt;
$VMSummary.SCSITarget = $VirtualDiskDevice.UnitNumber&lt;br /&gt;
$VMSummaries += $VMSummary&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
Clear-Variable VMView -ErrorAction SilentlyContinue&lt;br /&gt;
}&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Loop through Datastores&lt;/li&gt;
&lt;/ol&gt;
ForEach ($Datastore in $Datastores)&lt;br /&gt;
{&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;List vmdk files in datastore (vmdk Name)&lt;/li&gt;
&lt;/ol&gt;
Write-Progress “Gathering Information” (”Processing Datastore {0}” -f $Datastore.Name) -Id 0&lt;br /&gt;
$DSView = $Datastore | Get-View&lt;br /&gt;
$fileQueryFlags = New-Object VMware.Vim.FileQueryFlags&lt;br /&gt;
$fileQueryFlags.FileSize = $true&lt;br /&gt;
$fileQueryFlags.FileType = $true&lt;br /&gt;
$fileQueryFlags.Modification = $true&lt;br /&gt;
$searchSpec = New-Object VMware.Vim.HostDatastoreBrowserSearchSpec&lt;br /&gt;
$searchSpec.details = $fileQueryFlags&lt;br /&gt;
$searchSpec.sortFoldersFirst = $true&lt;br /&gt;
$dsBrowser = Get-View $DSView.browser&lt;br /&gt;
$rootPath = ““&lt;br /&gt;
$searchResult = $dsBrowser.SearchDatastoreSubFolders($rootPath, $searchSpec)&lt;br /&gt;
ForEach ($result in $searchResult)&lt;br /&gt;
{&lt;br /&gt;
ForEach ($vmdk in ($result.File | ?{$_.Path -like “*.vmdk”} | Sort Path))&lt;br /&gt;
{&lt;br /&gt;
Write-Progress “Gathering Information” (”Processing VMDK {0}” -f $vmdk.Path) -Id 1&lt;br /&gt;
Write-Host “==============================================================================”&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Find vm using the vmdk (VM Name)&lt;/li&gt;
&lt;/ol&gt;
$VMRef = ($VMSummaries | ?{$_.DiskFile -match $Datastore.Name -and $_.DiskFile -match $vmdk.Path})&lt;br /&gt;
“VMDK {0} belongs to VM {1}” -f $vmdk.Path, $VMRef.VM&lt;br /&gt;
If ($VMRef.Powerstate -eq “PoweredOn”)&lt;br /&gt;
{&lt;br /&gt;
Write-Host “VM is powered on” -ForegroundColor “yellow”&lt;br /&gt;
$Partitions = Get-WmiObject -Class Win32_DiskPartition -ComputerName $VMRef.HostName&lt;br /&gt;
If ($?)&lt;br /&gt;
{&lt;br /&gt;
$Disks = Get-WmiObject -Class Win32_DiskDrive -ComputerName $VMRef.HostName&lt;br /&gt;
$LogicalDisks = Get-WmiObject -Class Win32_LogicalDisk -ComputerName $VMRef.HostName&lt;br /&gt;
$DiskToPartition = Get-WmiObject -Class Win32_DiskDriveToDiskPartition -ComputerName $VMRef.HostName&lt;br /&gt;
$LogicalDiskToPartition = Get-WmiObject -Class Win32_LogicalDiskToPartition -ComputerName $VMRef.HostName&lt;br /&gt;
Write-Host “Read partition and disk information” -ForegroundColor “yellow”&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Match disk based on SCSI ID’s&lt;/li&gt;
&lt;/ol&gt;
$DiskMatch = $Disks | ?{($_.SCSIPort - 1) -eq $VMRef.SCSIController -and $_.SCSITargetID -eq $VMRef.SCSITarget}&lt;br /&gt;
If ($DiskMatch -eq $null){Write-Warning “NO MATCHES!”}&lt;br /&gt;
Else&lt;br /&gt;
{&lt;br /&gt;
Write-Host “Found match:” -ForegroundColor “yellow”&lt;br /&gt;
$DiskMatch&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Find the Partition(s) on this disk&lt;/li&gt;
&lt;/ol&gt;
$PartitionsOnDisk = ($DiskToPartition | ?{$_.Antecedent -eq $DiskMatch.__PATH})&lt;br /&gt;
If ($PartitionsOnDisk -eq $null){Write-Warning “NO PARTITIONS!”}&lt;br /&gt;
Else&lt;br /&gt;
{&lt;br /&gt;
ForEach ($PartitionOnDisk in $PartitionsOnDisk)&lt;br /&gt;
{&lt;br /&gt;
Write-Host “Disk contains partition” -ForegroundColor “yellow”&lt;br /&gt;
$PartitionOnDisk.Dependent&lt;br /&gt;
$PartitionMatches = $Partitions | ?{$_.__PATH -eq $PartitionOnDisk.Dependent}&lt;br /&gt;
ForEach ($PartitionMatch in $PartitionMatches)&lt;br /&gt;
{&lt;br /&gt;
$LogicalDiskRefs = $LogicalDiskToPartition | ?{$_.Antecedent -eq $PartitionMatch.__PATH}&lt;br /&gt;
If ($LogicalDiskRefs -eq $null)&lt;br /&gt;
{&lt;br /&gt;
Write-Warning “NO LOGICAL DISKS!”&lt;br /&gt;
}&lt;br /&gt;
Else&lt;br /&gt;
{&lt;br /&gt;
ForEach ($LogicalDiskRef in $LogicalDiskRefs)&lt;br /&gt;
{&lt;br /&gt;
$LogicalDiskMatches = $LogicalDisks | ?{$_.__PATH -eq $LogicalDiskRef.Dependent}&lt;br /&gt;
ForEach ($LogicalDiskMatch in $LogicalDiskMatches)&lt;br /&gt;
{&lt;br /&gt;
Write-Host “Matching Logical Disk:” -ForegroundColor “yellow”&lt;br /&gt;
$LogicalDiskMatch&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Create Output Object&lt;/li&gt;
&lt;/ol&gt;
$myObj = “” | Select Datastore, DSSizeGB, DSFreeGB, DSPercentFree, DiskFile, VM, HardDisk, DriveLetter, DiskSizeGB, DiskFreeGB, PercFree&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;List datastore name&lt;/li&gt;
&lt;/ol&gt;
$myObj.Datastore = $Datastore.Name&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Determine datastore size in GB&lt;/li&gt;
&lt;/ol&gt;
$myObj.DSSizeGB = &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(($Datastore.CapacityMB * 1MB / 1GB),$Decimals)&lt;br /&gt;
$myObj.DSFreeGB = &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(($Datastore.FreeSpaceMB * 1MB / 1GB),$Decimals)&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Determine datastore free space (DS%Free)&lt;/li&gt;
&lt;/ol&gt;
$myObj.DSPercentFree = &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((100*($Datastore.FreeSpaceMB/$Datastore.CapacityMB)),$Decimals)&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;List disk file name&lt;/li&gt;
&lt;/ol&gt;
$myObj.DiskFile = $vmdk.Path&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;List VM Name&lt;/li&gt;
&lt;/ol&gt;
$myObj.VM = $VMRef.VM&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Determine virtual hard disk / logical drive&lt;/li&gt;
&lt;/ol&gt;
$myObj.HardDisk = $VMRef.DiskName&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Report driveletter&lt;/li&gt;
&lt;/ol&gt;
$myObj.DriveLetter = $LogicalDiskMatch.DeviceID&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Report Size&lt;/li&gt;
&lt;/ol&gt;
$myObj.DiskSizeGB = &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(($LogicalDiskMatch.Size / 1GB),$Decimals)&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Report Free Space&lt;/li&gt;
&lt;/ol&gt;
$myObj.DiskFreeGB = &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(($LogicalDiskMatch.FreeSpace / 1GB),$Decimals)&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Calculate Percentage free space&lt;/li&gt;
&lt;/ol&gt;
$myObj.PercFree = &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((100 * (&lt;a class="jive-link-adddocument" href="http://communities.vmware.com/community-document-picker.jspa?communityID=&amp;subject=int"&gt;int&lt;/a&gt;($LogicalDiskMatch.FreeSpace / 1MB) / &lt;a class="jive-link-adddocument" href="http://communities.vmware.com/community-document-picker.jspa?communityID=&amp;subject=int"&gt;int&lt;/a&gt;($LogicalDiskMatch.Size / 1MB))),$Decimals)&lt;br /&gt;
Write-Host “RESULT:” -ForegroundColor “yellow”&lt;br /&gt;
$myObj&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Add output object to output collection&lt;/li&gt;
&lt;/ol&gt;
$myCol += $myObj&lt;br /&gt;
}&lt;br /&gt;
Clear-Variable LogicalDiskMatches -ErrorAction SilentlyContinue&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
Clear-Variable LogicalDiskRefs -ErrorAction SilentlyContinue&lt;br /&gt;
}&lt;br /&gt;
Clear-Variable PartitionMatches -ErrorAction SilentlyContinue&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
Clear-Variable PartitionsOnDisk -ErrorAction SilentlyContinue&lt;br /&gt;
}&lt;br /&gt;
Clear-Variable DiskMatch -ErrorAction SilentlyContinue&lt;br /&gt;
Clear-Variable Disks -ErrorAction SilentlyContinue&lt;br /&gt;
Clear-Variable LogicalDisks -ErrorAction SilentlyContinue&lt;br /&gt;
Clear-Variable DiskToPartition -ErrorAction SilentlyContinue&lt;br /&gt;
Clear-Variable LogicalDiskToPartition -ErrorAction SilentlyContinue&lt;br /&gt;
}&lt;br /&gt;
Clear-Variable Partitions -ErrorAction SilentlyContinue&lt;br /&gt;
}&lt;br /&gt;
Else&lt;br /&gt;
{&lt;br /&gt;
Write-Host “VM is powered off” -ForegroundColor “yellow”&lt;br /&gt;
}&lt;br /&gt;
Clear-Variable VMRef -ErrorAction SilentlyContinue&lt;br /&gt;
Write-Progress “Gathering Information” (”Processing VMDK {0}” -f $vmdk.Path) -Id 1 -Completed&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Disconnect from VC&lt;/li&gt;
&lt;/ol&gt;
Disconnect-VIServer -Confirm:$False&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;OUTPUT&lt;/li&gt;
&lt;/ol&gt;
Write-Host “===================================================”&lt;br /&gt;
Write-Host “===================================================”&lt;br /&gt;
$TotalDSFree = ($myCol | Select Datastore, DSFreeGB -Unique | Measure-Object DSFreeGB -Sum).Sum&lt;br /&gt;
$TotalDSSize = ($myCol | Select Datastore, DSSizeGB -Unique | Measure-Object DSSizeGB -Sum).Sum&lt;br /&gt;
$AverageDSFree = &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(100 * ($TotalDSFree / $TotalDSSize),$Decimals)&lt;br /&gt;
$AverageDiskFree = &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(100 * (($myCol | Measure-Object DiskFreeGB -Sum).Sum / ($myCol | Measure-Object DiskSizeGB -Sum).Sum),$Decimals)&lt;br /&gt;
Write-Host “Total DS Free: $TotalDSFree”&lt;br /&gt;
Write-Host “Total DS Size: $TotalDSSize”&lt;br /&gt;
Write-Host “Average DS Free Percentage: $AverageDSFree”&lt;br /&gt;
Write-Host “Average Disk Free Percentage: $AverageDiskFree”&lt;br /&gt;
$myCol | Export-Csv -NoTypeInformation ‘C:\scipts\VMwareDiskUsage.csv’</description>
      <pubDate>Wed, 29 Apr 2009 19:03:16 GMT</pubDate>
      <author>kevinr2008</author>
      <guid>http://communities.vmware.com/thread/207596</guid>
      <dc:date>2009-04-29T19:03:16Z</dc:date>
      <clearspace:dateToText>6 months, 3 weeks ago</clearspace:dateToText>
      <clearspace:messageCount>10</clearspace:messageCount>
      <clearspace:replyCount>9</clearspace:replyCount>
    </item>
  </channel>
</rss>

