<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by komang agusty on Medium]]></title>
        <description><![CDATA[Stories by komang agusty on Medium]]></description>
        <link>https://medium.com/@komangagusty?source=rss-2f2fd988e0e9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*F-6LIrUoVmhg6aM8.jpg</url>
            <title>Stories by komang agusty on Medium</title>
            <link>https://medium.com/@komangagusty?source=rss-2f2fd988e0e9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 06:46:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@komangagusty/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Nice looking HTML Report for Server Up-time, Disk Space and Memory Information with Powershell]]></title>
            <link>https://medium.com/@komangagusty/nice-looking-html-report-for-server-up-time-disk-space-and-memory-usage-with-powershell-a688e9589995?source=rss-2f2fd988e0e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/a688e9589995</guid>
            <dc:creator><![CDATA[komang agusty]]></dc:creator>
            <pubDate>Mon, 25 May 2015 09:58:44 GMT</pubDate>
            <atom:updated>2015-05-25T09:59:17.106Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently i got a request from customer to manually check their SharePoint Farm Servers Up-time, Disk Usage and Memory information. I was using <a href="https://technet.microsoft.com/en-us/sysinternals/bb545021.aspx">Sysinternals</a> Tools like psinfo and psexec to grab the data and draft it via email but but I’m too lazy to do that so I decided to use Windows Powershell to get the things done.</p><p>Basically this script is modified version from <a href="http://blogs.technet.com/b/heyscriptingguy/archive/2012/08/07/use-powershell-to-create-an-html-uptime-report.aspx"><strong>Ed Wilson, Technet Scripting Guy</strong></a>, i just add extra function to get memory usage and add some HTML style to make the report looks good.</p><p>First, define the path to store the HTML and list of all target servers.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e74e43dae8b93a1c1bd335f6a63863b0/href">https://medium.com/media/e74e43dae8b93a1c1bd335f6a63863b0/href</a></iframe><p>To calculate the uptime, use WMI class called <strong>win32_OperatingSystem</strong> and subtract current date (<em>Get-Date</em>) with <em>lastbootuptime</em> property that already converted to date-time format.</p><p><strong>(get-date)-$os.converttodatetime($os.lastbootuptime).Days</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1f1d205cc50c6ee0743dd25d56330338/href">https://medium.com/media/1f1d205cc50c6ee0743dd25d56330338/href</a></iframe><p>For the disk space information, use <strong>win32_Volume </strong>WMI class. By default <em>capacity </em>and <em>freespace </em>will present value in KB and for more clear result we divide the value with 1GB.</p><p>Percent Usage value is the result of <strong>((capacity-freespace) / capacity)*100)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*xeoYZSgo6s1EeTOdyZirlQ.jpeg" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8cb04ec48057d2df986a8c74770bb099/href">https://medium.com/media/8cb04ec48057d2df986a8c74770bb099/href</a></iframe><p>For Physical and Virtual memory information, (again) use <strong>Win32_OperatingSystem </strong>and utilize these following property:</p><blockquote><strong>totalvisiblememorysize,</strong></blockquote><blockquote><strong>freephysicalmemory,</strong></blockquote><blockquote><strong>totalvirtualmemorysize,</strong></blockquote><blockquote><strong>freevirtualmemory.</strong></blockquote><p>All above property by default showing in KiloByte, devide it with 1024 to get value in MB.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/563db09ac50369f75db1ffdc910b3a25/href">https://medium.com/media/563db09ac50369f75db1ffdc910b3a25/href</a></iframe><p>To get nice looking HTML add this extra style:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/86f20114acdc6b134de059066699a8aa/href">https://medium.com/media/86f20114acdc6b134de059066699a8aa/href</a></iframe><p>The final HTML Report will be look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*CPuuqVDQVcXIQyrdRYhh1Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*57AdglZzGwCC1G2AeTT6Mw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KkXnSgVf_hLVQPtLFtietw.jpeg" /></figure><p>Please find below the complete script:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8bf64cd73bfd943227aa6006aa6f6bf0/href">https://medium.com/media/8bf64cd73bfd943227aa6006aa6f6bf0/href</a></iframe><p>Cheers, Komang. ☺</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a688e9589995" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>