I think this will pretty much should get you started
use strict; use Win32::OLE('in'); use constant wbemFlagReturnImmediately => 0x10; use constant wbemFlagForwardOnly => 0x20; my @computers = ("PUTYOURCOMPUTERNAMEHERE"); foreach my $computer (@computers) { print "\n"; print "==========================================\n"; print "Computer: $computer\n"; print "==========================================\n"; my $objWMIService = Win32::OLE->GetObject("winmgmts:\\\\$computer\\ +root\\CIMV2") or die "WMI connection failed.\n"; my $colItems = $objWMIService->ExecQuery("SELECT * FROM Win32_Opera +tingSystem", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly); foreach my $objItem (in $colItems) { print "BootDevice: $objItem->{BootDevice}\n"; print "BuildNumber: $objItem->{BuildNumber}\n"; print "BuildType: $objItem->{BuildType}\n"; print "CreationClassName: $objItem->{CreationClassName}\n"; print "CSCreationClassName: $objItem->{CSCreationClassName}\n"; print "CSDVersion: $objItem->{CSDVersion}\n"; print "FreePhysicalMemory: $objItem->{FreePhysicalMemory}\n"; print "FreeVirtualMemory: $objItem->{FreeVirtualMemory}\n"; print "InstallDate: $objItem->{InstallDate}\n"; print "LastBootUpTime: $objItem->{LastBootUpTime}\n"; print "LocalDateTime: $objItem->{LocalDateTime}\n"; print "Manufacturer: $objItem->{Manufacturer}\n"; print "Name: $objItem->{Name}\n"; print "NumberOfProcesses: $objItem->{NumberOfProcesses}\n"; print "NumberOfUsers: $objItem->{NumberOfUsers}\n"; print "Organization: $objItem->{Organization}\n"; print "OSType: $objItem->{OSType}\n"; print "RegisteredUser: $objItem->{RegisteredUser}\n"; print "SerialNumber: $objItem->{SerialNumber}\n"; print "ServicePackMajorVersion: $objItem->{ServicePackMajorVersi +on}\n"; print "ServicePackMinorVersion: $objItem->{ServicePackMinorVersi +on}\n"; print "Status: $objItem->{Status}\n"; print "SystemDevice: $objItem->{SystemDevice}\n"; print "SystemDirectory: $objItem->{SystemDirectory}\n"; print "Version: $objItem->{Version}\n"; print "WindowsDirectory: $objItem->{WindowsDirectory}\n"; print "\n"; } system("ipconfig /all"); }sub WMIDateStringToDate(strDate) { return "blah"; }

In reply to Re^2: Need windows system info by softworkz
in thread Need windows system info by aatlamaz

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.