{"id":2927,"date":"2019-10-31T16:36:36","date_gmt":"2019-10-31T21:36:36","guid":{"rendered":"http:\/\/microsoftgeek.com\/?p=2927"},"modified":"2019-10-31T16:59:20","modified_gmt":"2019-10-31T21:59:20","slug":"powershell-email-me-when-disk-space-is-running-low-on-my-windows-servers-w-sql-server-integration","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=2927","title":{"rendered":"PowerShell: Email me when Disk Space is running low on my Windows Servers (w\/ SQL Server Integration)"},"content":{"rendered":"\n<p>Have you ever ran into a situation where your disk space on your Windows Server were running low and you had to constantly remote into the server to check the disk space? Now, imagine if you had to do this for 10-100 servers! holy crap.<\/p>\n\n\n\n<p>With this PowerShell script you can get an email notification when your disk space is running low on your Windows Servers. Previously, I posted another powershell script that would also notify you via email (  <a href=\"http:\/\/microsoftgeek.com\/?p=2772\">http:\/\/microsoftgeek.com\/?p=2772<\/a>  ) <\/p>\n\n\n\n<p>This specific script integrates SQL Server to manage the data and to formal a nice looking email. see the example below of the data output:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"369\" height=\"237\" src=\"http:\/\/microsoftgeek.com\/wp-content\/uploads\/2019\/10\/example-servers.png\" alt=\"\" class=\"wp-image-2928\" srcset=\"https:\/\/microsoftgeek.com\/wp-content\/uploads\/2019\/10\/example-servers.png 369w, https:\/\/microsoftgeek.com\/wp-content\/uploads\/2019\/10\/example-servers-300x193.png 300w, https:\/\/microsoftgeek.com\/wp-content\/uploads\/2019\/10\/example-servers-140x90.png 140w\" sizes=\"auto, (max-width: 369px) 100vw, 369px\" \/><figcaption>Email Example<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Here is the script below:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><a href=\"http:\/\/microsoftgeek.com\/wp-content\/uploads\/2019\/10\/script1-2.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/microsoftgeek.com\/wp-content\/uploads\/2019\/10\/script1-2-1024x654.png\" alt=\"\" class=\"wp-image-2936\" width=\"1111\" height=\"709\" srcset=\"https:\/\/microsoftgeek.com\/wp-content\/uploads\/2019\/10\/script1-2-1024x654.png 1024w, https:\/\/microsoftgeek.com\/wp-content\/uploads\/2019\/10\/script1-2-300x192.png 300w, https:\/\/microsoftgeek.com\/wp-content\/uploads\/2019\/10\/script1-2-768x491.png 768w, https:\/\/microsoftgeek.com\/wp-content\/uploads\/2019\/10\/script1-2-140x90.png 140w, https:\/\/microsoftgeek.com\/wp-content\/uploads\/2019\/10\/script1-2.png 1410w\" sizes=\"auto, (max-width: 1111px) 100vw, 1111px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><a href=\"http:\/\/microsoftgeek.com\/wp-content\/uploads\/2019\/10\/script2-2.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/microsoftgeek.com\/wp-content\/uploads\/2019\/10\/script2-2-1024x350.png\" alt=\"\" class=\"wp-image-2937\" width=\"1118\" height=\"382\" srcset=\"https:\/\/microsoftgeek.com\/wp-content\/uploads\/2019\/10\/script2-2-1024x350.png 1024w, https:\/\/microsoftgeek.com\/wp-content\/uploads\/2019\/10\/script2-2-300x102.png 300w, https:\/\/microsoftgeek.com\/wp-content\/uploads\/2019\/10\/script2-2-768x262.png 768w, https:\/\/microsoftgeek.com\/wp-content\/uploads\/2019\/10\/script2-2.png 1485w\" sizes=\"auto, (max-width: 1118px) 100vw, 1118px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Have you ever ran into a situation where your disk space on your Windows Server were running low and you had to constantly remote into the server to check the disk space? Now, imagine if you had to do this for 10-100 servers! holy crap. With this PowerShell script you can get an email notification [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,58,62,73,59,71],"tags":[],"class_list":["post-2927","post","type-post","status-publish","format-standard","hentry","category-exchange-2010","category-exchange-2013","category-microsoft-exchange-server-2016","category-exchange-server-2019","category-powershell","category-sql-server"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2927","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2927"}],"version-history":[{"count":5,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2927\/revisions"}],"predecessor-version":[{"id":2946,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2927\/revisions\/2946"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}