<?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: PowerCLI: SnapReminder</title>
	<atom:link href="http://www.virtu-al.net/2009/06/22/powercli-snapreminder/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.virtu-al.net/2009/06/22/powercli-snapreminder/</link>
	<description>Virtually everything is poshable</description>
	<lastBuildDate>Thu, 09 Feb 2012 21:00:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Steve</title>
		<link>http://www.virtu-al.net/2009/06/22/powercli-snapreminder/#comment-13467</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Tue, 31 Jan 2012 16:20:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=712#comment-13467</guid>
		<description>I just can&#039;t get this script to work it just keeps saying that it doesn&#039;t expect $smptServer at he beginning.nplease please help

Thanks Steve</description>
		<content:encoded><![CDATA[<p>I just can&#8217;t get this script to work it just keeps saying that it doesn&#8217;t expect $smptServer at he beginning.nplease please help</p>
<p>Thanks Steve</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://www.virtu-al.net/2009/06/22/powercli-snapreminder/#comment-7595</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Mon, 29 Aug 2011 17:27:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=712#comment-7595</guid>
		<description>This is a great script you can run on a daily scheduled basis. Just modify the following statement in the &#039;foreach&#039; loop towards the bottom of the script: &quot;(Get-Date).AddDays(0)&quot;. Awesome script and works as described. Kudos to the author!</description>
		<content:encoded><![CDATA[<p>This is a great script you can run on a daily scheduled basis. Just modify the following statement in the &#8216;foreach&#8217; loop towards the bottom of the script: &#8220;(Get-Date).AddDays(0)&#8221;. Awesome script and works as described. Kudos to the author!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NN</title>
		<link>http://www.virtu-al.net/2009/06/22/powercli-snapreminder/#comment-7419</link>
		<dc:creator>NN</dc:creator>
		<pubDate>Thu, 11 Aug 2011 20:13:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=712#comment-7419</guid>
		<description>Dumped some more objects and actually it WAS what Jurgen suggested. Probably works nicely in UK as-is, but if the timezone isn&#039;t GMT/UTC you&#039;re generating two different $key&#039;s in the code. 
This resolved some of the problems, but still _old_ (over 2yrs or so) snapshots are missing the creator - for which I can see two plausible reasons - too many tasks and/or this damn DST (making the deviation an ever-changing target).
But this is a minor issue, since who would want daily e-mails for lengthy periods of time ;)
Thanks for the script anyway.</description>
		<content:encoded><![CDATA[<p>Dumped some more objects and actually it WAS what Jurgen suggested. Probably works nicely in UK as-is, but if the timezone isn&#8217;t GMT/UTC you&#8217;re generating two different $key&#8217;s in the code.<br />
This resolved some of the problems, but still _old_ (over 2yrs or so) snapshots are missing the creator &#8211; for which I can see two plausible reasons &#8211; too many tasks and/or this damn DST (making the deviation an ever-changing target).<br />
But this is a minor issue, since who would want daily e-mails for lengthy periods of time <img src='http://www.virtu-al.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Thanks for the script anyway.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bryan</title>
		<link>http://www.virtu-al.net/2009/06/22/powercli-snapreminder/#comment-7418</link>
		<dc:creator>Bryan</dc:creator>
		<pubDate>Thu, 11 Aug 2011 20:09:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=712#comment-7418</guid>
		<description>Whew, I&#039;m not alone!  

I too have spent the day trying to get SnapReminder able to email the creator of the snapshot.  It seems that there is not a &quot;Creator&quot; attribute (value? variable?).  When I run the script through the PowerGUI Script Editor, I can expand the$SnapshotInfo variable, I do not see &quot;Creator&quot; - or any reference to the creator of the snapshot.

I&#039;ve found a script that pulls out snapshot creator information from the VPX_TASK table in the vCenter database, so the information is in there.  I&#039;m not sure where else it might recorded.</description>
		<content:encoded><![CDATA[<p>Whew, I&#8217;m not alone!  </p>
<p>I too have spent the day trying to get SnapReminder able to email the creator of the snapshot.  It seems that there is not a &#8220;Creator&#8221; attribute (value? variable?).  When I run the script through the PowerGUI Script Editor, I can expand the$SnapshotInfo variable, I do not see &#8220;Creator&#8221; &#8211; or any reference to the creator of the snapshot.</p>
<p>I&#8217;ve found a script that pulls out snapshot creator information from the VPX_TASK table in the vCenter database, so the information is in there.  I&#8217;m not sure where else it might recorded.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NN</title>
		<link>http://www.virtu-al.net/2009/06/22/powercli-snapreminder/#comment-7416</link>
		<dc:creator>NN</dc:creator>
		<pubDate>Thu, 11 Aug 2011 17:26:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=712#comment-7416</guid>
		<description>Thanks for the swift response. Unfortunately the output is (for each snapshot) &quot;Snapshot ***** has a creator of .&quot; 
I can see the use that initiated the taks in vSphere client, so the info has to be somewhere. I also already tried that timedeviation-trick that Jurgen suggested, although I&#039;m not quite sure why it would help since all the servers are on the same timezone.</description>
		<content:encoded><![CDATA[<p>Thanks for the swift response. Unfortunately the output is (for each snapshot) &#8220;Snapshot ***** has a creator of .&#8221;<br />
I can see the use that initiated the taks in vSphere client, so the info has to be somewhere. I also already tried that timedeviation-trick that Jurgen suggested, although I&#8217;m not quite sure why it would help since all the servers are on the same timezone.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Virtu-Al</title>
		<link>http://www.virtu-al.net/2009/06/22/powercli-snapreminder/#comment-7415</link>
		<dc:creator>Virtu-Al</dc:creator>
		<pubDate>Thu, 11 Aug 2011 16:36:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=712#comment-7415</guid>
		<description>What do you get if you change the last loop to this, do you get a username ?

[ps]foreach ($snap in (Get-VM &#124; Get-Snapshot &#124; Where {$_.Created -lt ((Get-Date).AddDays(-14))})){
   $SnapshotInfo = Get-SnapshotExtra $snap  
Write-Host &quot;Snapshot $($snap.name) has a creator of $($SnapshotInfo.Creator).&quot;	    
}[/ps]</description>
		<content:encoded><![CDATA[<p>What do you get if you change the last loop to this, do you get a username ?</p>
<pre class="brush: powershell; title: ; notranslate">foreach ($snap in (Get-VM | Get-Snapshot | Where {$_.Created -lt ((Get-Date).AddDays(-14))})){
   $SnapshotInfo = Get-SnapshotExtra $snap
Write-Host &quot;Snapshot $($snap.name) has a creator of $($SnapshotInfo.Creator).&quot;
}</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: NN</title>
		<link>http://www.virtu-al.net/2009/06/22/powercli-snapreminder/#comment-7414</link>
		<dc:creator>NN</dc:creator>
		<pubDate>Thu, 11 Aug 2011 15:52:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=712#comment-7414</guid>
		<description>I tried the script on 4.1 and it gets all the snapshots (and sizes with a small modification) but the creator can not be found for ANY of the dozen or so snapshots. Any ideas why? The snapshots have been created using vSphere client, either while on ESX 4.0 or on ESXi 4.1 - no difference in results. I tried to dump the whole SnapshotInfo-object, but couldn&#039;t find anything pointing to the creator of the snapshot.</description>
		<content:encoded><![CDATA[<p>I tried the script on 4.1 and it gets all the snapshots (and sizes with a small modification) but the creator can not be found for ANY of the dozen or so snapshots. Any ideas why? The snapshots have been created using vSphere client, either while on ESX 4.0 or on ESXi 4.1 &#8211; no difference in results. I tried to dump the whole SnapshotInfo-object, but couldn&#8217;t find anything pointing to the creator of the snapshot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jurgen</title>
		<link>http://www.virtu-al.net/2009/06/22/powercli-snapreminder/#comment-6541</link>
		<dc:creator>Jurgen</dc:creator>
		<pubDate>Thu, 26 May 2011 12:45:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=712#comment-6541</guid>
		<description>Or change the following rule:

$key = $_.EntityName + &quot;&amp;&quot; + ($snapshot.CreateTime.ToString())

To:

$timedeviation =  get-date -uformat &quot;%Z&quot;
$key = $_.EntityName + &quot;&amp;&quot; + (($snapshot.CreateTime.AddHours($timedeviation)).ToString())</description>
		<content:encoded><![CDATA[<p>Or change the following rule:</p>
<p>$key = $_.EntityName + &#8220;&amp;&#8221; + ($snapshot.CreateTime.ToString())</p>
<p>To:</p>
<p>$timedeviation =  get-date -uformat &#8220;%Z&#8221;<br />
$key = $_.EntityName + &#8220;&amp;&#8221; + (($snapshot.CreateTime.AddHours($timedeviation)).ToString())</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jurgen</title>
		<link>http://www.virtu-al.net/2009/06/22/powercli-snapreminder/#comment-6540</link>
		<dc:creator>Jurgen</dc:creator>
		<pubDate>Thu, 26 May 2011 11:49:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=712#comment-6540</guid>
		<description>Chris

Remove the following line: 

$key = $_.vm.Name + &quot;&amp;&quot; + ($_.Created.ToString())

That works for me because i&#039;m in a not UCT/GMT timezone</description>
		<content:encoded><![CDATA[<p>Chris</p>
<p>Remove the following line: </p>
<p>$key = $_.vm.Name + &#8220;&#038;&#8221; + ($_.Created.ToString())</p>
<p>That works for me because i&#8217;m in a not UCT/GMT timezone</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.virtu-al.net/2009/06/22/powercli-snapreminder/#comment-6449</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Thu, 19 May 2011 20:39:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=712#comment-6449</guid>
		<description>Can anyone help me.  I keep getting the same error running this script.  It seems like it can&#039;t get the username.

Exception calling &quot;Add&quot; with &quot;1&quot; argument(s): &quot;Value cannot be null.
Parameter name: item&quot;
At C:\Users\gateway\Desktop\snap.ps1:86 char:13
+     $msg.To.Add &lt;&lt;&lt;&lt; ($Mailto)
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException

Exception calling &quot;Send&quot; with &quot;1&quot; argument(s): &quot;A recipient must be specified.&quot;
At C:\Users\gateway\Desktop\snap.ps1:99 char:12
+     $smtp.Send &lt;&lt;&lt;&lt; ($msg)
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException</description>
		<content:encoded><![CDATA[<p>Can anyone help me.  I keep getting the same error running this script.  It seems like it can&#8217;t get the username.</p>
<p>Exception calling &#8220;Add&#8221; with &#8220;1&#8243; argument(s): &#8220;Value cannot be null.<br />
Parameter name: item&#8221;<br />
At C:\Users\gateway\Desktop\snap.ps1:86 char:13<br />
+     $msg.To.Add &lt;&lt;&lt;&lt; ($Mailto)<br />
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException<br />
    + FullyQualifiedErrorId : DotNetMethodException</p>
<p>Exception calling &quot;Send&quot; with &quot;1&quot; argument(s): &quot;A recipient must be specified.&quot;<br />
At C:\Users\gateway\Desktop\snap.ps1:99 char:12<br />
+     $smtp.Send &lt;&lt;&lt;&lt; ($msg)<br />
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException<br />
    + FullyQualifiedErrorId : DotNetMethodException</p>
]]></content:encoded>
	</item>
</channel>
</rss>

