{"id":20395,"date":"2023-05-17T02:19:54","date_gmt":"2023-05-17T02:19:54","guid":{"rendered":"https:\/\/green.cloud\/docs\/docs\/greencloud-documents\/windows-operating-systems\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\/"},"modified":"2026-01-19T00:45:40","modified_gmt":"2026-01-19T00:45:40","slug":"runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail-20395","status":"publish","type":"docs","link":"https:\/\/green.cloud\/docs\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\/","title":{"rendered":"RunningLow &#8211; PowerShell script to check for disk space and send e-mail"},"content":{"rendered":"<p>Today I would like to share with our readers\u00a0<strong>RunningLow<\/strong>, a simple yet effective PowerShell script I coded a while ago to get to know when one of my servers is running low on disk space.<\/p>\n<p>Whoever works with physical and\/or virtualized Windows Servers is well aware of the importance of keeping this constantly under control: as soon as a server runs out of disk space it will be unable to fulfill a number of tasks, such as: creating temporary files, store data on a database, performing system maintenance\/backup\/updates, create or update web sessions &#8211; assuming they are handled through I\/O &#8211; and so on. Things can be even worse for those servers that host DBMS services such as MySQL and MS-SQL, as the sudden I\/O unavailability could cause non-trivial damages to indexes, <em>filesystem<\/em>-based tables, and data integrity.<\/p>\n<p>The main purpose of\u00a0<strong>RunningLow<\/strong> is to prevent all that: it will check one or more local and\/or network drives to see if their available free space went under a certain quota, and send a customizable alert to one or more e-mail addresses if that&#8217;s the case. I know, there are A LOT of admin suites and maintenance software that could be easily configured to do the same thing: even Piriform&#8217;s CCleaner PRO does that! However, if you don&#8217;t have the money, the time, or the amount of system resources required to install these apps, you might find out that this lightweight alternative could be worth a shot.<\/p>\n<p><iframe title=\"RunningLow \u2013 PowerShell script to check for disk space and send e-mail | VPS Tutorial\" width=\"1170\" height=\"658\" src=\"https:\/\/www.youtube.com\/embed\/vGaLYUV3UCs?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/p>\n<h2><span style=\"font-size: 2rem;\">Source Code<\/span><\/h2>\n<div id=\"urvanov-syntax-highlighter-646438d43b497221409522\" class=\"urvanov-syntax-highlighter-syntax crayon-theme-familiar urvanov-syntax-highlighter-font-sourcecodepro urvanov-syntax-highlighter-os-pc print-yes notranslate\" data-settings=\" minimize scroll-mouseover\">\n<div class=\"urvanov-syntax-highlighter-main\">\n<div class=\"entry-content\">\n<div class=\"pf-content\">\n<p>Anyway, here&#8217;s the script source code:<\/p>\n<div id=\"urvanov-syntax-highlighter-646438d43b497221409522\" class=\"urvanov-syntax-highlighter-syntax crayon-theme-familiar urvanov-syntax-highlighter-font-sourcecodepro urvanov-syntax-highlighter-os-pc print-yes notranslate\" data-settings=\" minimize scroll-mouseover\">\n<div class=\"urvanov-syntax-highlighter-plain-wrap\"><\/div>\n<div class=\"urvanov-syntax-highlighter-main\">\n<table class=\"crayon-table\">\n<tbody>\n<tr class=\"urvanov-syntax-highlighter-row\">\n<td class=\"crayon-nums \" data-settings=\"show\">\n<div class=\"urvanov-syntax-highlighter-nums-content\">\n<div class=\"crayon-num\" data-line=\"urvanov-syntax-highlighter-646438d43b497221409522-81\"><\/div>\n<\/div>\n<\/td>\n<td class=\"urvanov-syntax-highlighter-code\">\n<div class=\"crayon-pre\">\n<div id=\"urvanov-syntax-highlighter-646438d43b497221409522-17\" class=\"crayon-line\"><span style=\"font-family: inherit; font-size: inherit;\"># Drives to check: set to $null or empty to check all local (non-network) drives<\/span><\/div>\n<div id=\"urvanov-syntax-highlighter-646438d43b497221409522-81\" class=\"crayon-line\">\n<p># $drives = @(&#8220;C&#8221;,&#8221;D&#8221;);<br \/>\n$drives = $null;<\/p>\n<p># The minimum disk size to check for raising the warning<br \/>\n$minSize = 20GB;<\/p>\n<p># SMTP configuration: username, password &amp; so on<br \/>\n$email_username = &#8220;<span class=\"crayon-s\">mailserver@yourdomain.com<\/span>&#8220;;<br \/>\n$email_password = &#8220;<span class=\"crayon-s\">yourpassword.mailserver<\/span>&#8220;;<br \/>\n$email_smtp_host = &#8220;smtp.<span class=\"crayon-s\">yourdomain<\/span>.com&#8221;;<br \/>\n$email_smtp_port = 587;<br \/>\n$email_smtp_SSL = $true;<br \/>\n$email_from_address = &#8220;<span class=\"crayon-s\">mailserver@yourdomain.com<\/span>&#8220;;<br \/>\n$email_to_addressArray = @(&#8220;<span class=\"crayon-s\">to@yourdomain.com<\/span>&#8220;);<\/p>\n<p>&nbsp;<\/p>\n<p>if ($drives -eq $null -Or $drives -lt 1) {<br \/>\n$localVolumes = Get-WMIObject win32_volume;<br \/>\n$drives = @();<br \/>\nforeach ($vol in $localVolumes) {<br \/>\nif ($vol.DriveType -eq 3 -And $vol.DriveLetter -ne $null ) {<br \/>\n$drives += $vol.DriveLetter[0];<br \/>\n}<br \/>\n}<br \/>\n}<br \/>\nforeach ($d in $drives) {<br \/>\nWrite-Host (&#8220;`r`n&#8221;);<br \/>\nWrite-Host (&#8220;Checking drive &#8221; + $d + &#8221; &#8230;&#8221;);<br \/>\n$disk = Get-PSDrive $d;<br \/>\nif ($disk.Free -lt $minSize) {<br \/>\nWrite-Host (&#8220;Drive &#8221; + $d + &#8221; has less than &#8221; + $minSize `<br \/>\n+ &#8221; bytes free (&#8221; + $disk.free + &#8220;): sending e-mail&#8230;&#8221;);<br \/>\n$message = new-object Net.Mail.MailMessage;<br \/>\n$message.From = $email_from_address;<br \/>\nforeach ($to in $email_to_addressArray) {<br \/>\n$message.To.Add($to);<br \/>\n}<br \/>\n$message.Subject =(&#8220;[RunningLow] WARNING: &#8221; + $env:computername + &#8221; drive &#8221; + $d);<br \/>\n$message.Subject += (&#8221; has less than &#8221; + $minSize + &#8221; bytes free &#8220;);<br \/>\n$message.Subject += (&#8220;(&#8221; + $disk.Free + &#8220;)&#8221;);<br \/>\n$message.Body =&#8221;Hello there, `r`n`r`n&#8221;;<br \/>\n$message.Body +=&#8221;this is an automatic e-mail message &#8220;;<br \/>\n$message.Body +=&#8221;sent by RunningLow Powershell script &#8220;;<br \/>\n$message.Body +=(&#8220;to inform you that &#8221; + $env:computername + &#8221; drive &#8221; + $d + &#8221; &#8220;);<br \/>\n$message.Body +=&#8221;is running low on free space. `r`n`r`n&#8221;;<br \/>\n$message.Body +=&#8221;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#8220;;<br \/>\n$message.Body +=&#8221;`r`n&#8221;;<br \/>\n$message.Body +=(&#8220;Machine HostName: &#8221; + $env:computername + &#8221; `r`n&#8221;);<br \/>\n$message.Body +=&#8221;Machine IP Address(es): &#8220;;<br \/>\n$ipAddresses = Get-NetIPAddress -AddressFamily IPv4;<br \/>\nforeach ($ip in $ipAddresses) {<br \/>\nif ($ip.IPAddress -like &#8220;127.0.0.1&#8221;) {<br \/>\ncontinue;<br \/>\n}<br \/>\n$message.Body += ($ip.IPAddress + &#8221; &#8220;);<br \/>\n}<br \/>\n$message.Body +=&#8221;`r`n&#8221;;<br \/>\n$message.Body +=(&#8220;Used space on drive &#8221; + $d + &#8220;: &#8221; + $disk.Used + &#8221; bytes. `r`n&#8221;);<br \/>\n$message.Body +=(&#8220;Free space on drive &#8221; + $d + &#8220;: &#8221; + $disk.Free + &#8221; bytes. `r`n&#8221;);<br \/>\n$message.Body +=&#8221;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#8220;;<br \/>\n$message.Body +=&#8221;`r`n`r`n&#8221;;<br \/>\n$message.Body +=&#8221;This warning will fire when the free space is lower &#8220;;<br \/>\n$message.Body +=(&#8220;than &#8221; + $minSize + &#8221; bytes `r`n`r`n&#8221;);<br \/>\n$message.Body +=&#8221;Sincerely, `r`n`r`n&#8221;;<br \/>\n$message.Body +=&#8221;&#8211; `r`n&#8221;;<br \/>\n$message.Body +=&#8221;RunningLow`r`n&#8221;;<br \/>\n$message.Body +=&#8221;https:\/\/www.ryadel.com\/RunningLow&#8221;;<\/p>\n<p>$smtp = new-object Net.Mail.SmtpClient($email_smtp_host, $email_smtp_port);<br \/>\n$smtp.EnableSSL = $email_smtp_SSL;<br \/>\n$smtp.Credentials = New-Object System.Net.NetworkCredential($email_username, $email_password);<br \/>\n$smtp.send($message);<br \/>\n$message.Dispose();<br \/>\nwrite-host &#8220;&#8230; E-Mail sent!&#8221; ;<br \/>\n}<br \/>\nelse {<br \/>\nWrite-Host (&#8220;Drive &#8221; + $d + &#8221; has more than &#8221; + $minSize + &#8221; bytes free: nothing to do.&#8221;);<br \/>\n}<br \/>\n}<\/p>\n<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>Copy\/paste it into a text file, save it to\u00a0<strong>RunningLow.ps1<\/strong> (or any other name) and you should be set.<\/p>\n<p dir=\"auto\">Here&#8217;s a list of all RunningLow configuration settings (and their meaning). Each one of them corresponds to a command-line parameter, meaning that you can either set them using the CLI or change their default value within the script itself.<\/p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\">\n<pre class=\"notranslate\"><code>- minSize\r\n<\/code><\/pre>\n<\/div>\n<p dir=\"auto\">The minimum free disk space acceptable threshold: any checked drive with less available space will raise a warning.<\/p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\">\n<pre class=\"notranslate\"><code>- hosts\r\n<\/code><\/pre>\n<\/div>\n<p dir=\"auto\">If specified, will also check the disk space on the given colon-separated list of hostnames (machine names OR ip addresses) within the LAN.<\/p>\n<p dir=\"auto\">Example: $hosts = &#8220;HOSTNAME1:HOSTNAME2:129.168.0.115&#8221;<\/p>\n<p dir=\"auto\"><strong>IMPORTANT<\/strong>: Connecting to remote machines will require launching\u00a0<em>RunningLow<\/em>\u00a0with elevated priviledges and having the\u00a0<em><strong>Windows Management Service<\/strong><\/em>\u00a0up, running and reachable (TCP port 5985) on the remote machine.<\/p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\">\n<pre class=\"notranslate\"><code>- volumes\r\n<\/code><\/pre>\n<\/div>\n<p dir=\"auto\">A colon-separated list of the drive volumes (letters) to check: set it to $null to check all local (non-network) drives.<\/p>\n<p dir=\"auto\">Example: $volumes = &#8220;C:D&#8221;;<\/p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\">\n<pre class=\"notranslate\"><code>- email_to\r\n<\/code><\/pre>\n<\/div>\n<p dir=\"auto\">If specified, will send a low-disk-space warning email to the given colon-separated addresses.<\/p>\n<p dir=\"auto\">Example: $email_to = &#8220;<a href=\"mailto:my@email.com\">my@email.com<\/a>:<a href=\"mailto:your@email.com\">your@email.com<\/a>&#8220;;<\/p>\n<p dir=\"auto\">Default is $null (no e-mail will be sent). Replace it with\u00a0<a href=\"mailto:your@email.com\">your@email.com<\/a>\u00a0if you don&#8217;t want to set it from the CLI.<\/p>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\">\n<pre class=\"notranslate\"><code>- email_username = \"mailserver@yourdomain.com\"\r\n- email_password = \"yourpassword<span class=\"crayon-s\">.mailserver<\/span>\"\r\n- email_smtp_host = \"smtp.yourdomain.com\"\r\n- email_smtp_port = 587\r\n- email_smtp_SSL = $true\r\n- email_from = \"mailserver@yourdomain.com\"\r\n<\/code><\/pre>\n<\/div>\n<p dir=\"auto\">The above parameters can be used to set up your SMTP configuration for sending the e-mail alerts: username, password &amp; so on. It&#8217;s strongly advisable to set them within the code instead of setting them from the CLI, as you might rarely want to change them. Needless to say, if you don&#8217;t want RunningLow to send any e-mail, you might as well skip the whole part: just remember to set\u00a0<code>-email_to<\/code>\u00a0value to\u00a0<code>$null<\/code>\u00a0to have the code skip that as well.<\/p>\n<h2><span id=\"Configuration\">Configuration<\/span><\/h2>\n<p>The first ten or so lines host the configuration settings, which you should change accordingly to your needs and depending to your specific scenario. The most important thing to understand is the first line: as we can see, we can either specify an array of drives &#8211; including network drives, as long as they&#8217;re permanently mapped to a local drive letter &#8211; or set a\u00a0<em>null<\/em>\u00a0value: if we go for the latter, the script will check all local drives.<\/p>\n<p>The comments should be enough to guide you through this required part: however, if you need further assistance, you can use the comment section of this post to submit your query and I&#8217;ll do my best to help you with that.<\/p>\n<h2><span id=\"Testing\">Testing<\/span><\/h2>\n<p>As soon as you&#8217;re done with the configuration, you can test the script from the standard Windows Command Prompt with the following command:<\/p>\n<pre>powershell -executionpolicy bypass -File C:\\script\\RunningLow.ps1<\/pre>\n<div id=\"urvanov-syntax-highlighter-646438d43b49d713360313\" class=\"urvanov-syntax-highlighter-syntax crayon-theme-familiar urvanov-syntax-highlighter-font-sourcecodepro urvanov-syntax-highlighter-os-pc print-yes notranslate\" data-settings=\" minimize scroll-mouseover\">\n<div class=\"urvanov-syntax-highlighter-main\">&#8230; Or right click and run with PowerShell ISE.<\/div>\n<\/div>\n<p>As soon as you should see something like this: (&#8230; Meaning that everything went ok.)<\/p>\n<h3><span id=\"Sending_E-Mail_Alerts\">Sending E-Mail Alerts<\/span><\/h3>\n<p>Needless to say, you should then edit the script, raise the\u00a0<strong>$minSize<\/strong>\u00a0value to a ridiculously high amount (such as 5TB) and run another test to ensure that the e-mail alerts will actually be sent:<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-8301 jetpack-lazy-image jetpack-lazy-image--handled\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2023\/05\/Screenshot_3-2.png\" alt=\"RunningLow - PowerShell script to check for disk space and send e-mail\" width=\"710\" height=\"274\" data-lazy-loaded=\"1\" \/><\/p>\n<p>&#8230; That&#8217;s it.<\/p>\n<h2><span id=\"Installing\">Installing<\/span><\/h2>\n<p>It goes without saying that the script should not be launched manually: the best thing we can do to ensure that it will be executed on regular basis is to create an appropriate entry in the Windows\u00a0<strong>Task Scheduler<\/strong>. In the example below,\u00a0<strong>RunningLow<\/strong>\u00a0will be executed once a day at noon:<\/p>\n<\/div>\n<p><img decoding=\"async\" class=\"shadow aligncenter wp-image-8302 size-large jetpack-lazy-image jetpack-lazy-image--handled\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2023\/05\/Screenshot_1-4.png\" alt=\"RunningLow - PowerShell script to check for disk space and send e-mail\" width=\"648\" height=\"755\" data-lazy-loaded=\"1\" \/><\/p>\n<div class=\"pf-content\">\n<div class=\"google-auto-placed ap_container\">\n<p>&nbsp;<\/p>\n<div id=\"aswift_2_host\" tabindex=\"0\" title=\"Advertisement\" aria-label=\"Advertisement\"><img decoding=\"async\" class=\"shadow aligncenter wp-image-8302 size-large jetpack-lazy-image jetpack-lazy-image--handled\" src=\"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2023\/05\/Screenshot_2-3.png\" alt=\"RunningLow - PowerShell script to check for disk space and send e-mail\" width=\"648\" height=\"755\" data-lazy-loaded=\"1\" \/><\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<p>In the\u00a0<strong>New Action<\/strong>\u00a0window you can either insert the full execution statement (including parameters) in the\u00a0<strong>Program\/script<\/strong>\u00a0textbox, or use the\u00a0<strong>Add arguments (optional)<\/strong>\u00a0textbox:\u00a0the script will work either way. Similarly, you can specify the full path of the \u00a0<strong>RunningLow.ps1<\/strong>\u00a0file within the\u00a0<strong>-File<\/strong>\u00a0parameter or put it into the\u00a0<strong>Start in (optional)<\/strong>\u00a0textbox, just like we did in the above screenshot.<\/p>\n<p><strong>IMPORTANT<\/strong>: In the scheduled task\u00a0<strong>General<\/strong>\u00a0tab, be sure to activate the options\u00a0<strong>Run whether the user is logged on or not<\/strong>\u00a0and\u00a0<strong>Run with highest priviledges<\/strong>, otherwise the script would run only if there&#8217;s a logged-in user during the execution time.<\/p>\n<p>Be sure to test it again &#8211; by setting an insanely high\u00a0<strong>$minSize<\/strong>\u00a0&#8211; on the server as well, to be sure that there are no firewalls or other restrictions that would block the e-mail alerts.<\/p>\n<div class=\"google-auto-placed ap_container\">\n<p>Well, that&#8217;s it for now: I sincerely hope that you will enjoy having <strong>RunningLow<\/strong>\u00a0on your servers just like I do!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today I would like to share with our readers\u00a0RunningLow, a simple yet effective PowerShell script I coded a while ago to get to know when one of my servers is running low on disk space. Whoever works with physical and\/or virtualized Windows Servers is well aware of the importance of keeping this constantly under control: [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":0,"parent":17815,"menu_order":96,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-20395","docs","type-docs","status-publish","hentry","no-post-thumbnail"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>RunningLow - PowerShell script to check for disk space and send e-mail - GreenCloud Documentation<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/green.cloud\/docs\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"RunningLow - PowerShell script to check for disk space and send e-mail - GreenCloud Documentation\" \/>\n<meta property=\"og:description\" content=\"Today I would like to share with our readers\u00a0RunningLow, a simple yet effective PowerShell script I coded a while ago to get to know when one of my servers is running low on disk space. Whoever works with physical and\/or virtualized Windows Servers is well aware of the importance of keeping this constantly under control: [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/green.cloud\/docs\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\/\" \/>\n<meta property=\"og:site_name\" content=\"GreenCloud Documentation\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-19T00:45:40+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\\\/\",\"url\":\"https:\\\/\\\/green.cloud\\\/docs\\\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\\\/\",\"name\":\"RunningLow - PowerShell script to check for disk space and send e-mail - GreenCloud Documentation\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/green.cloud\\\/docs\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/Screenshot_3-2.png\",\"datePublished\":\"2023-05-17T02:19:54+00:00\",\"dateModified\":\"2026-01-19T00:45:40+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/green.cloud\\\/docs\\\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\\\/#primaryimage\",\"url\":\"https:\\\/\\\/green.cloud\\\/docs\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/Screenshot_3-2.png\",\"contentUrl\":\"https:\\\/\\\/green.cloud\\\/docs\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/Screenshot_3-2.png\",\"width\":730,\"height\":266},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/green.cloud\\\/docs\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"GreenCloud Documents\",\"item\":\"https:\\\/\\\/green.cloud\\\/docs\\\/docs\\\/greencloud-documents\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Windows Operating Systems\",\"item\":\"https:\\\/\\\/green.cloud\\\/docs\\\/windows-operating-systems\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"RunningLow &#8211; PowerShell script to check for disk space and send e-mail\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/green.cloud\\\/docs\\\/#website\",\"url\":\"https:\\\/\\\/green.cloud\\\/docs\\\/\",\"name\":\"GreenCloud Documentation\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/green.cloud\\\/docs\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"RunningLow - PowerShell script to check for disk space and send e-mail - GreenCloud Documentation","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/green.cloud\/docs\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\/","og_locale":"en_US","og_type":"article","og_title":"RunningLow - PowerShell script to check for disk space and send e-mail - GreenCloud Documentation","og_description":"Today I would like to share with our readers\u00a0RunningLow, a simple yet effective PowerShell script I coded a while ago to get to know when one of my servers is running low on disk space. Whoever works with physical and\/or virtualized Windows Servers is well aware of the importance of keeping this constantly under control: [&hellip;]","og_url":"https:\/\/green.cloud\/docs\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\/","og_site_name":"GreenCloud Documentation","article_modified_time":"2026-01-19T00:45:40+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/green.cloud\/docs\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\/","url":"https:\/\/green.cloud\/docs\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\/","name":"RunningLow - PowerShell script to check for disk space and send e-mail - GreenCloud Documentation","isPartOf":{"@id":"https:\/\/green.cloud\/docs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/green.cloud\/docs\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\/#primaryimage"},"image":{"@id":"https:\/\/green.cloud\/docs\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\/#primaryimage"},"thumbnailUrl":"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2023\/05\/Screenshot_3-2.png","datePublished":"2023-05-17T02:19:54+00:00","dateModified":"2026-01-19T00:45:40+00:00","breadcrumb":{"@id":"https:\/\/green.cloud\/docs\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/green.cloud\/docs\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/green.cloud\/docs\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\/#primaryimage","url":"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2023\/05\/Screenshot_3-2.png","contentUrl":"https:\/\/green.cloud\/docs\/wp-content\/uploads\/2023\/05\/Screenshot_3-2.png","width":730,"height":266},{"@type":"BreadcrumbList","@id":"https:\/\/green.cloud\/docs\/runninglow-powershell-script-to-check-for-disk-space-and-send-e-mail\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/green.cloud\/docs\/"},{"@type":"ListItem","position":2,"name":"GreenCloud Documents","item":"https:\/\/green.cloud\/docs\/docs\/greencloud-documents\/"},{"@type":"ListItem","position":3,"name":"Windows Operating Systems","item":"https:\/\/green.cloud\/docs\/windows-operating-systems\/"},{"@type":"ListItem","position":4,"name":"RunningLow &#8211; PowerShell script to check for disk space and send e-mail"}]},{"@type":"WebSite","@id":"https:\/\/green.cloud\/docs\/#website","url":"https:\/\/green.cloud\/docs\/","name":"GreenCloud Documentation","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/green.cloud\/docs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/docs\/20395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/comments?post=20395"}],"version-history":[{"count":14,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/docs\/20395\/revisions"}],"predecessor-version":[{"id":21199,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/docs\/20395\/revisions\/21199"}],"up":[{"embeddable":true,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/docs\/17815"}],"wp:attachment":[{"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/media?parent=20395"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/green.cloud\/docs\/wp-json\/wp\/v2\/doc_tag?post=20395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}