<?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: Check disk space with Powershell</title>
	<atom:link href="http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195/feed" rel="self" type="application/rss+xml" />
	<link>http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195</link>
	<description>making DBAs everywhere curse!</description>
	<lastBuildDate>Sat, 04 Feb 2012 06:02:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jeff</title>
		<link>http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195/comment-page-1#comment-1858</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Fri, 06 Jan 2012 15:11:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195#comment-1858</guid>
		<description>Thanks for the script.  I was looking for something like this to monitor a server that fills up on occasion.  You saved me a lot of time by publishing this script.

Cheers.

Jeff</description>
		<content:encoded><![CDATA[<p>Thanks for the script.  I was looking for something like this to monitor a server that fills up on occasion.  You saved me a lot of time by publishing this script.</p>
<p>Cheers.</p>
<p>Jeff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ErwinvA</title>
		<link>http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195/comment-page-1#comment-1638</link>
		<dc:creator>ErwinvA</dc:creator>
		<pubDate>Tue, 22 Nov 2011 11:12:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195#comment-1638</guid>
		<description>Great script, thanks for sharing.

Erwin</description>
		<content:encoded><![CDATA[<p>Great script, thanks for sharing.</p>
<p>Erwin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rhys</title>
		<link>http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195/comment-page-1#comment-1423</link>
		<dc:creator>Rhys</dc:creator>
		<pubDate>Tue, 11 Oct 2011 22:19:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195#comment-1423</guid>
		<description>Hi Stuart,
Mmm, I&#039;d output the variables in the calculation. NaN...

&quot;The value of this constant is the result of dividing zero by zero.&quot; &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.double.nan%28v=vs.80%29.aspx&quot; rel=&quot;nofollow&quot;&gt;ref&lt;/a&gt;

Perhaps it&#039;s having trouble getting the values for this drive.

Cheers,

Rhys</description>
		<content:encoded><![CDATA[<p>Hi Stuart,<br />
Mmm, I&#8217;d output the variables in the calculation. NaN&#8230;</p>
<p>&#8220;The value of this constant is the result of dividing zero by zero.&#8221; <a href="http://msdn.microsoft.com/en-us/library/system.double.nan%28v=vs.80%29.aspx" rel="nofollow">ref</a></p>
<p>Perhaps it&#8217;s having trouble getting the values for this drive.</p>
<p>Cheers,</p>
<p>Rhys</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stuart</title>
		<link>http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195/comment-page-1#comment-1422</link>
		<dc:creator>Stuart</dc:creator>
		<pubDate>Tue, 11 Oct 2011 21:55:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195#comment-1422</guid>
		<description>Great code. One issue: I&#039;m getting NaN as a result for one of the logical drives. When I check manually on the server, I can see this drive&#039;s usage (110 GB used out of 500 GB).

Not sure why I&#039;m getting a non-number result.</description>
		<content:encoded><![CDATA[<p>Great code. One issue: I&#8217;m getting NaN as a result for one of the logical drives. When I check manually on the server, I can see this drive&#8217;s usage (110 GB used out of 500 GB).</p>
<p>Not sure why I&#8217;m getting a non-number result.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rhys</title>
		<link>http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195/comment-page-1#comment-232</link>
		<dc:creator>Rhys</dc:creator>
		<pubDate>Sat, 16 Oct 2010 02:36:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195#comment-232</guid>
		<description>Hi TJ,

Looks like a permissions issue to me so check this on the server in question.

Cheers,

Rhys</description>
		<content:encoded><![CDATA[<p>Hi TJ,</p>
<p>Looks like a permissions issue to me so check this on the server in question.</p>
<p>Cheers,</p>
<p>Rhys</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TJ</title>
		<link>http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195/comment-page-1#comment-230</link>
		<dc:creator>TJ</dc:creator>
		<pubDate>Fri, 15 Oct 2010 01:33:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195#comment-230</guid>
		<description>I keep getting the error below for one of my servers. Any idea why?

Get-WmiObject : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESS
DENIED))
At C:\server_check.ps1:12 char:24
+     $disks = Get-WmiObject  &lt;&lt;&lt;&lt; -ComputerName $server -Class Win32_LogicalDisk -Filter &quot;DriveType = 3&quot;;</description>
		<content:encoded><![CDATA[<p>I keep getting the error below for one of my servers. Any idea why?</p>
<p>Get-WmiObject : Access is denied. (Exception from HRESULT: 0&#215;80070005 (E_ACCESS<br />
DENIED))<br />
At C:\server_check.ps1:12 char:24<br />
+     $disks = Get-WmiObject  &lt;&lt;&lt;&lt; -ComputerName $server -Class Win32_LogicalDisk -Filter &quot;DriveType = 3&quot;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rhys</title>
		<link>http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195/comment-page-1#comment-199</link>
		<dc:creator>Rhys</dc:creator>
		<pubDate>Thu, 17 Jun 2010 22:09:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195#comment-199</guid>
		<description>Hi Nathan,

Welcome to the awesome world of Powershell!

The original script generates a text file so you don&#039;t need to worry about that. The $DriveSpace variable was just a suggestion to get the content into an email. If you run the original script do you have a text file in your user directory called &quot;server disks yyyymmddhhmiss.txt&quot;? I&#039;ve retested the script and it works fine for me. Try the original script and check your user folder for the file.

Cheers,

Rhys</description>
		<content:encoded><![CDATA[<p>Hi Nathan,</p>
<p>Welcome to the awesome world of Powershell!</p>
<p>The original script generates a text file so you don&#8217;t need to worry about that. The $DriveSpace variable was just a suggestion to get the content into an email. If you run the original script do you have a text file in your user directory called &#8220;server disks yyyymmddhhmiss.txt&#8221;? I&#8217;ve retested the script and it works fine for me. Try the original script and check your user folder for the file.</p>
<p>Cheers,</p>
<p>Rhys</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathan</title>
		<link>http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195/comment-page-1#comment-198</link>
		<dc:creator>Nathan</dc:creator>
		<pubDate>Thu, 17 Jun 2010 03:25:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195#comment-198</guid>
		<description>Hey there, Rhys... awesome script, thank you!

About your last comment... I&#039;m a total beginner to PS, so could you explain a bit on how to put that $DriveSpace variable into the script properly in order to output all the results into a text file?  I&#039;ve tried it myself a couple of times, but I&#039;m not having a lot of luck.  My text file generates, but ends up with just &quot;server,deviceID,size,freespace,percentFree&quot; in it.

Your assistance is much appreciated.  Thanks!

-Nathan</description>
		<content:encoded><![CDATA[<p>Hey there, Rhys&#8230; awesome script, thank you!</p>
<p>About your last comment&#8230; I&#8217;m a total beginner to PS, so could you explain a bit on how to put that $DriveSpace variable into the script properly in order to output all the results into a text file?  I&#8217;ve tried it myself a couple of times, but I&#8217;m not having a lot of luck.  My text file generates, but ends up with just &#8220;server,deviceID,size,freespace,percentFree&#8221; in it.</p>
<p>Your assistance is much appreciated.  Thanks!</p>
<p>-Nathan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rhys</title>
		<link>http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195/comment-page-1#comment-184</link>
		<dc:creator>Rhys</dc:creator>
		<pubDate>Fri, 21 May 2010 11:45:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195#comment-184</guid>
		<description>Hi Aron,

I also write the output into a text file so you can read the contents of this into a variable with the &lt;a href=&quot;http://technet.microsoft.com/en-us/library/ee176843.aspx&quot; rel=&quot;nofollow&quot;&gt;Get-Content&lt;/a&gt; cmdlet. Something like this should do it...
&lt;code&gt;$DriveSpace = Get-Content &quot;$Env:USERPROFILE\server disks $datetime.txt&quot;;&lt;/code&gt;

Cheers,

Rhys</description>
		<content:encoded><![CDATA[<p>Hi Aron,</p>
<p>I also write the output into a text file so you can read the contents of this into a variable with the <a href="http://technet.microsoft.com/en-us/library/ee176843.aspx" rel="nofollow">Get-Content</a> cmdlet. Something like this should do it&#8230;<br />
<code>$DriveSpace = Get-Content "$Env:USERPROFILE\server disks $datetime.txt";</code></p>
<p>Cheers,</p>
<p>Rhys</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aron</title>
		<link>http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195/comment-page-1#comment-180</link>
		<dc:creator>Aron</dc:creator>
		<pubDate>Tue, 18 May 2010 22:42:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.youdidwhatwithtsql.com/check-disk-space-with-powershell-2/195#comment-180</guid>
		<description>Hey Thanks for script! 

This is almost exactly what I&#039;m trying to do, except I need it to output the result of the script to the body of an email.  I think what I need it to make the output into a variable I can call in the body of the email, in my example below I called it $DriveSpace.

$SmtpClient = new-object system.net.mail.smtpClient
$SmtpServer = &quot;MAILSERVER&quot;
$SmtpClient.host = 
$SmtpServer 

$From = &quot;USER &quot;
$To = &quot;ADDRESS@DOMAIN.COM&quot;
$Title = &quot;Email Title&quot;
$Body = $DriveSpace
$msg.IsBodyHTML = $true
$SmtpClient.Send($from,$to,$title,$Body)

I&#039;m pretty new to Powershell and this is my first attempt at scripting, any advice would be appreciated :)</description>
		<content:encoded><![CDATA[<p>Hey Thanks for script! </p>
<p>This is almost exactly what I&#8217;m trying to do, except I need it to output the result of the script to the body of an email.  I think what I need it to make the output into a variable I can call in the body of the email, in my example below I called it $DriveSpace.</p>
<p>$SmtpClient = new-object system.net.mail.smtpClient<br />
$SmtpServer = &#8220;MAILSERVER&#8221;<br />
$SmtpClient.host =<br />
$SmtpServer </p>
<p>$From = &#8220;USER &#8221;<br />
$To = &#8220;ADDRESS@DOMAIN.COM&#8221;<br />
$Title = &#8220;Email Title&#8221;<br />
$Body = $DriveSpace<br />
$msg.IsBodyHTML = $true<br />
$SmtpClient.Send($from,$to,$title,$Body)</p>
<p>I&#8217;m pretty new to Powershell and this is my first attempt at scripting, any advice would be appreciated <img src='http://www.youdidwhatwithtsql.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

