Unfortunately, you will need to have something on each remote server that runs locally on each one to collect the drive information that you're after. If you're not wanting to install and maintain Perl environments everywhere, you could use something like the pp utility from PAR::Packer to bundle your script into a stand alone executable that can be distributed and run on each system.

However, you still need to find a way to remotely execute something on each server and retrieve outputs. Unfortunately, Windows does not automatically have something like a telnet or SSH server installed and running. There are couple of alternatives to installing a telnet or SSH server on each remote system. If have PowerShell installed (its part of newer Windows versions and can be installed on some older versions), PowerShell has an ability to issue commands to on remote Windows systems. I haven't done that myself, so I can't provide pointers on how to use PowerShell to do that.

Another alternative is using PsExec from the SysInternals suite of tools available for free from Microsoft's web site.

There are probably lots of other ways to remotely run programs on Windows systems, but the suggestions above are a good starting point.


In reply to Re: Running Perl on Remote Windows Server by dasgar
in thread Running Perl on Remote Windows Server by coding_new

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.