<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Why is the Powershell Modular Input not scheduling the script to run? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-the-Powershell-Modular-Input-not-scheduling-the-script-to/m-p/373937#M67775</link>
    <description>&lt;P&gt;Here is my inputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[powershell://checkdnsext]
script = . "$SplunkHome\etc\apps\test_infra_dnsext_inputs\bin\checkdnsext.ps1"
schedule = `0 */5 * ? * *`
sourcetype = test:powershell
index = test
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is my Powershell located in /app/bin:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$ErrorActionPreference="SilentlyContinue"
$ipaddress = $(ipconfig | where {$_ -match 'IPv4.+\s(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' } | out-null; $Matches[1])
$dnstest=Resolve-DnsName -Name google.com -server $ipaddress -QuickTimeout -Type A | select Name
if ($dnstest -like '*google*') {
$result="1"
write-host ((get-date),"`nExternal DNS Status:","$result")
}
else{
$result="0"
write-host ((get-date),"`nExternal DNS Status:","$result")
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The script works.  I don't see any errors in splunkd.log on the client, other than the fact that I don't see it scheduling the script to run.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
    <pubDate>Wed, 02 May 2018 15:27:51 GMT</pubDate>
    <dc:creator>Kendo213</dc:creator>
    <dc:date>2018-05-02T15:27:51Z</dc:date>
    <item>
      <title>Why is the Powershell Modular Input not scheduling the script to run?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-the-Powershell-Modular-Input-not-scheduling-the-script-to/m-p/373937#M67775</link>
      <description>&lt;P&gt;Here is my inputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[powershell://checkdnsext]
script = . "$SplunkHome\etc\apps\test_infra_dnsext_inputs\bin\checkdnsext.ps1"
schedule = `0 */5 * ? * *`
sourcetype = test:powershell
index = test
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is my Powershell located in /app/bin:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$ErrorActionPreference="SilentlyContinue"
$ipaddress = $(ipconfig | where {$_ -match 'IPv4.+\s(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' } | out-null; $Matches[1])
$dnstest=Resolve-DnsName -Name google.com -server $ipaddress -QuickTimeout -Type A | select Name
if ($dnstest -like '*google*') {
$result="1"
write-host ((get-date),"`nExternal DNS Status:","$result")
}
else{
$result="0"
write-host ((get-date),"`nExternal DNS Status:","$result")
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The script works.  I don't see any errors in splunkd.log on the client, other than the fact that I don't see it scheduling the script to run.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 15:27:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-the-Powershell-Modular-Input-not-scheduling-the-script-to/m-p/373937#M67775</guid>
      <dc:creator>Kendo213</dc:creator>
      <dc:date>2018-05-02T15:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the Powershell Modular Input not scheduling the script to run?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-the-Powershell-Modular-Input-not-scheduling-the-script-to/m-p/373938#M67776</link>
      <description>&lt;P&gt;Can you try with a service restart.&lt;/P&gt;</description>
      <pubDate>Thu, 03 May 2018 09:21:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-the-Powershell-Modular-Input-not-scheduling-the-script-to/m-p/373938#M67776</guid>
      <dc:creator>ansif</dc:creator>
      <dc:date>2018-05-03T09:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the Powershell Modular Input not scheduling the script to run?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-the-Powershell-Modular-Input-not-scheduling-the-script-to/m-p/373939#M67777</link>
      <description>&lt;P&gt;I've tried restarting the service numerous times.  That cron has 's around it because of the Splunk forum.  It doesn't complain about an invalid cron in the internal logs.&lt;/P&gt;</description>
      <pubDate>Thu, 03 May 2018 13:39:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-the-Powershell-Modular-Input-not-scheduling-the-script-to/m-p/373939#M67777</guid>
      <dc:creator>Kendo213</dc:creator>
      <dc:date>2018-05-03T13:39:27Z</dc:date>
    </item>
  </channel>
</rss>

