<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Add Snapshot Information to the VI Client using Powershell</title>
	<atom:link href="http://www.peetersonline.nl/index.php/vmware/add-snapshot-information-to-the-vi-client-using-powershell/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.peetersonline.nl/index.php/vmware/add-snapshot-information-to-the-vi-client-using-powershell/</link>
	<description>Using Powershell for (virtually) everything!</description>
	<lastBuildDate>Fri, 03 Feb 2012 11:41:32 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Add Drive Persistence State to the VI Client using Powershell &#171; ben.neise.co.uk</title>
		<link>http://www.peetersonline.nl/index.php/vmware/add-snapshot-information-to-the-vi-client-using-powershell/comment-page-1/#comment-4266</link>
		<dc:creator>Add Drive Persistence State to the VI Client using Powershell &#171; ben.neise.co.uk</dc:creator>
		<pubDate>Tue, 05 May 2009 12:02:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.peetersonline.nl/?p=147#comment-4266</guid>
		<description>[...] further adapted Hugo&#8217;s script to add a custom attribute which shows the drive persistence state(s) when the script was run. # Add [...]</description>
		<content:encoded><![CDATA[<p>[...] further adapted Hugo&#8217;s script to add a custom attribute which shows the drive persistence state(s) when the script was run. # Add [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ben.neise.co.uk &#187; Add Disk Size Information to the VI Client using Powershell</title>
		<link>http://www.peetersonline.nl/index.php/vmware/add-snapshot-information-to-the-vi-client-using-powershell/comment-page-1/#comment-4026</link>
		<dc:creator>ben.neise.co.uk &#187; Add Disk Size Information to the VI Client using Powershell</dc:creator>
		<pubDate>Wed, 29 Apr 2009 11:41:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.peetersonline.nl/?p=147#comment-4026</guid>
		<description>[...] This is based on Hugo Peeters&#8217; script to Add Snapshot Information to the VI Client using Powershell. [...]</description>
		<content:encoded><![CDATA[<p>[...] This is based on Hugo Peeters&#8217; script to Add Snapshot Information to the VI Client using <a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx" target='_blank'>Powershell</a>. [...]
<p style="opacity:0.5;padding:0;margin:0;display:inline;"><sub><a href="http://www.janhvizdak.com/make-donation-cross-linker-plugin-wordpress.php" onclick="window.open('http://www.janhvizdak.com/make-donation-cross-linker-plugin-wordpress.php'); return false;" target="_blank" style="cursor:help;"><b>&#187;crosslinked&#171;</b></a></sub></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://www.peetersonline.nl/index.php/vmware/add-snapshot-information-to-the-vi-client-using-powershell/comment-page-1/#comment-3327</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Wed, 25 Mar 2009 14:04:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.peetersonline.nl/?p=147#comment-3327</guid>
		<description>Hugo,

This is a great script, very usefull in our configuration.
Any idea how (if possible) to get the &quot;age&quot; of the snapshot displayed?

Thx,
Mike.</description>
		<content:encoded><![CDATA[<p>Hugo,</p>
<p>This is a great script, very usefull in our configuration.<br />
Any idea how (if possible) to get the &#8220;age&#8221; of the snapshot displayed?</p>
<p>Thx,<br />
Mike.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.peetersonline.nl/index.php/vmware/add-snapshot-information-to-the-vi-client-using-powershell/comment-page-1/#comment-2993</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Wed, 11 Mar 2009 07:32:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.peetersonline.nl/?p=147#comment-2993</guid>
		<description>&lt;a href=&quot;#comment-2981&quot; rel=&quot;nofollow&quot;&gt;@ron &lt;/a&gt; 
Hi Ron,

The updates script can be downloaded here:
http://www.peetersonline.nl/wp-content/add-vmsnapshotcount.txt

I will add it to the Script Repository soon for easy reference.

Hugo</description>
		<content:encoded><![CDATA[<p><a href="#comment-2981" rel="nofollow">@ron </a><br />
Hi Ron,</p>
<p>The updates script can be downloaded here:<br />
<a href="http://www.peetersonline.nl/wp-content/add-vmsnapshotcount.txt" rel="nofollow">http://www.peetersonline.nl/wp-content/add-vmsnapshotcount.txt</a></p>
<p>I will add it to the Script Repository soon for easy reference.</p>
<p>Hugo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ron</title>
		<link>http://www.peetersonline.nl/index.php/vmware/add-snapshot-information-to-the-vi-client-using-powershell/comment-page-1/#comment-2981</link>
		<dc:creator>ron</dc:creator>
		<pubDate>Tue, 10 Mar 2009 18:43:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.peetersonline.nl/?p=147#comment-2981</guid>
		<description>Hi,

I realize this is an older post, but can you paste what the final code would look like with your suggested &quot;ForEach&quot; change.  I&#039;m new to powershell and need a little help if you have a moment.

Thanks Very Much,

Ron</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I realize this is an older post, but can you paste what the final code would look like with your suggested &#8220;ForEach&#8221; change.  I&#8217;m new to <a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx" target='_blank'>powershell</a> and need a little help if you have a moment.</p>
<p>Thanks Very Much,</p>
<p>Ron</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.peetersonline.nl/index.php/vmware/add-snapshot-information-to-the-vi-client-using-powershell/comment-page-1/#comment-1839</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 16 Jan 2009 06:47:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.peetersonline.nl/?p=147#comment-1839</guid>
		<description>That&#039;s true! So why not change the code into this:
$SnapshotCount = ($VM &#124; Get-Snapshot &#124; Measure-Object).Count
You have to Change the loop to be ForEach ($VM in $VMs) and put $VMView = $VM &#124; Get-View inside the loop.
Hugo</description>
		<content:encoded><![CDATA[<p>That&#8217;s true! So why not change the code into this:<br />
$SnapshotCount = ($VM | Get-Snapshot | Measure-Object).Count<br />
You have to Change the loop to be ForEach ($VM in $VMs) and put $VMView = $VM | Get-View inside the loop.<br />
Hugo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon</title>
		<link>http://www.peetersonline.nl/index.php/vmware/add-snapshot-information-to-the-vi-client-using-powershell/comment-page-1/#comment-1833</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Fri, 16 Jan 2009 00:17:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.peetersonline.nl/?p=147#comment-1833</guid>
		<description>The code &quot;$SnapshotCount = ($VMView.Snapshot.RootSnapshotList &#124; Measure-Object).Count&quot; will only count the first level of snapshots. To count all snapshots you will need to recurse through the ChildSnapshotList of each snapshot in the RootSnapshotList.

For example:

$VMSnapshotCount = 0
$VMSnapshots = $VMView.Snapshot.RootSnapshotList
ForEach ($VMSnapshot in $VMSnapshots) {
   Write-Output (&quot;Found snapshot: &quot; + $VMSnapshot.Name)
   $VMSnapshotCount++;
   $VMSnapshotCount += findSnapshots($VMSnapshot)
}

function findSnapshots([VMware.Vim.VirtualMachineSnapshot]$VMSnapshot) {
   $VMChildSnapshots = $VMSnapshot.ChildSnapshotList
   $VMChildSnapshotCount = 0
   ForEach ($VMChildSnapshot in $VMChildSnapshots) {
      $VMChildSnapshotCount += findSnapshots($VMChildSnapshot)
   }
   return $VMChildSnapshots
}

Note: This code is untested, but logically you need to recurse through the ChildSnapshotList for each snapshot in the RootSnapshotList.

Simon</description>
		<content:encoded><![CDATA[<p>The code &#8220;$SnapshotCount = ($VMView.Snapshot.RootSnapshotList | Measure-Object).Count&#8221; will only count the first level of snapshots. To count all snapshots you will need to recurse through the ChildSnapshotList of each snapshot in the RootSnapshotList.</p>
<p>For example:</p>
<p>$VMSnapshotCount = 0<br />
$VMSnapshots = $VMView.Snapshot.RootSnapshotList<br />
ForEach ($VMSnapshot in $VMSnapshots) {<br />
   Write-Output (&#8220;Found snapshot: &#8221; + $VMSnapshot.Name)<br />
   $VMSnapshotCount++;<br />
   $VMSnapshotCount += findSnapshots($VMSnapshot)<br />
}</p>
<p>function findSnapshots([VMware.Vim.VirtualMachineSnapshot]$VMSnapshot) {<br />
   $VMChildSnapshots = $VMSnapshot.ChildSnapshotList<br />
   $VMChildSnapshotCount = 0<br />
   ForEach ($VMChildSnapshot in $VMChildSnapshots) {<br />
      $VMChildSnapshotCount += findSnapshots($VMChildSnapshot)<br />
   }<br />
   return $VMChildSnapshots<br />
}</p>
<p>Note: This code is untested, but logically you need to recurse through the ChildSnapshotList for each snapshot in the RootSnapshotList.</p>
<p>Simon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Compare ESX configurations with Powershell &#171; H9Newser&#8217;s Blog</title>
		<link>http://www.peetersonline.nl/index.php/vmware/add-snapshot-information-to-the-vi-client-using-powershell/comment-page-1/#comment-1710</link>
		<dc:creator>Compare ESX configurations with Powershell &#171; H9Newser&#8217;s Blog</dc:creator>
		<pubDate>Wed, 07 Jan 2009 16:03:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.peetersonline.nl/?p=147#comment-1710</guid>
		<description>[...] for having vmotion capabilities and therefore essential for a solid HA configuration. I have showed you earlier</description>
		<content:encoded><![CDATA[<p>[...] for having vmotion capabilities and therefore essential for a solid HA configuration. I have showed you earlier</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Compare ESX configurations with Powershell &#124; PeetersOnline.nl</title>
		<link>http://www.peetersonline.nl/index.php/vmware/add-snapshot-information-to-the-vi-client-using-powershell/comment-page-1/#comment-1700</link>
		<dc:creator>Compare ESX configurations with Powershell &#124; PeetersOnline.nl</dc:creator>
		<pubDate>Wed, 07 Jan 2009 08:02:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.peetersonline.nl/?p=147#comment-1700</guid>
		<description>[...] for having vmotion capabilities and therefore essential for a solid HA configuration. I have showed you earlier</description>
		<content:encoded><![CDATA[<p>[...] for having vmotion capabilities and therefore essential for a solid HA configuration. I have showed you earlier</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.peetersonline.nl/index.php/vmware/add-snapshot-information-to-the-vi-client-using-powershell/comment-page-1/#comment-1428</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 19 Dec 2008 06:48:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.peetersonline.nl/?p=147#comment-1428</guid>
		<description>From Powershell of course!
Install Windows Powershell and the VMware VI Toolkit (http://www.vmware.com/go/powershell) and copy-paste the code into the window of save it as a .ps1 file and start it by typing the full path to the file in the powershell window.</description>
		<content:encoded><![CDATA[<p>From <a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx" target='_blank'>Powershell</a> of course!<br />
Install Windows <a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx" target='_blank'>Powershell</a> and the <a href="http://www.vmware.com/" target='_blank'>VMware</a> <a href="http://www.vmware.com/sdk/vitk_win/index.html" target='_blank'>VI Toolkit</a> (<a href="http://www.vmware.com/go/powershell" rel="nofollow">http://www.vmware.com/go/powershell</a>) and copy-paste the code into the window of save it as a .ps1 file and start it by typing the full path to the file in the <a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx" target='_blank'>powershell</a> window.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

