Posting the original working VB is fine, but what does your Perl look like? I'd expect something a little like:

my $objLocator = CreateObject("WbemScripting->SWbemLocator"); my $objWMIService = $objLocator->ConnectServer("es-g01-app01", "root\\ +cimv2", "NDRSMP\\p57571", "Dragon#06"); my $colItems = objWMIService->ExecQuery($wmiQuery); print ("Now establish a scheduled task"); my $objNewJob = objWMIService->Get("Win32_ScheduledJob"); my @objTZone = objWMIService->ExecQuery("Select Bias From Win32_TimeZo +ne"); $strBias = $_->Bias for @objTZone; my $SchdTime = TimeConvert(time, $strBias); $objWMIService = GetObject( "winmgmts:{impersonationLevel=impersonate, (Security)}!\\es-g01-ap +p01\root\cimv2" ); $objNewJob = objWMIService->Get("Win32_ScheduledJob"); my $errJobCreated = $objNewJob->Create("C:\\Rescue21\\install\\fixsnmp +->bat", SchdTime, False , undef, undef, undef, JobID);

DWIM is Perl's answer to Gödel

In reply to Re: need vb script to be perl by GrandFather
in thread need vb script to be perl by JFarr

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.