<?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 Re: Splunk 7 powershell input not emitting in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-7-powershell-input-not-emitting/m-p/363725#M43919</link>
    <description>&lt;P&gt;I've found that from Splunk v6.6+, PowerShell script scheduling is broken (i.e. it runs extremely sporadically, if at all) - there appears to be an issue with sending signals from $SPLUNK_HOME/bin/splunk-powershell.exe to $SPLUNK_HOME/bin/splunk-powershell-common.ps1 - specifically the WaitForWinMultipleObjects statement in the waitCronEvents function just isn't getting anything meaningful to respond to.&lt;/P&gt;

&lt;P&gt;I've raised the issue with Splunk and am awaiting a resolution.&lt;/P&gt;

&lt;P&gt;Short term work-arounds - I've found two (both work for Splunk v6.6, not tested under 7.0.x)&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Replace splunk-powershell.exe with a
version from an earlier version of
Splunk (any of the 6.5.x series
appear to be find)&lt;/LI&gt;
&lt;LI&gt;Deploy the Splunk Add-on for
Microsoft PowerShell
(SA-ModularInput-PowerShell). I
renamed
SA-ModularInput-Powershell\windows_x86_64\Powershell.exe
to PowershellM.exe (ditto for the
associated config file), and updated
the README\inputs.cof.spec  (to
powershellm://default]), in order to
avoid namespace conflicts. Reminder -
the Add On uses a different
scheduler, you'll need to update your
schedule to match.&lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Tue, 29 Sep 2020 17:39:12 GMT</pubDate>
    <dc:creator>jimmoriarty</dc:creator>
    <dc:date>2020-09-29T17:39:12Z</dc:date>
    <item>
      <title>Splunk 7 powershell input not emitting</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-7-powershell-input-not-emitting/m-p/363724#M43918</link>
      <description>&lt;P&gt;I can't for the life of me get powershell input to work correctly.&lt;BR /&gt;
I realize this is asked a lot but I'm not able to find a working answer for Splunk 7 after quite a lot of searching.&lt;BR /&gt;
I have the powershell, windows infrastructure, and AD add-on's installed. Splunk running on server 2016 with system account.&lt;/P&gt;

&lt;P&gt;Input in apps\Splunk_TA_windows\local&lt;BR /&gt;
    [powershell://win32share]&lt;BR /&gt;
    script = gwmi Win32_Share | where Type -eq 0 | select name,path,status | Select-Object *,@{n="SplunkHost";e={$Env:SPLUNK_SERVER_NAME}}&lt;BR /&gt;
    sourcetype = Windows:Process&lt;BR /&gt;
    schedule = 0 */5 * * *&lt;/P&gt;

&lt;P&gt;This worked once after which I could not get it to work again. I even changed the name, tried changing index and source type, etc.&lt;BR /&gt;
The reason I changed it was to put this into a script as I'm trying to rebuild the file share monitoring from old Splunk blog posts.&lt;/P&gt;

&lt;P&gt;The script input was&lt;BR /&gt;
    [powershell://win32_share]&lt;BR /&gt;
    script = . "$SplunkHome\etc\apps\Splunk_TA_windows\bin\win32_share.ps1"&lt;BR /&gt;
    index = windows&lt;BR /&gt;
    source = Powershell&lt;BR /&gt;
    sourcetype = Windows:Share&lt;BR /&gt;
    schedule = 0 */5 * * *&lt;/P&gt;

&lt;P&gt;Test script of&lt;BR /&gt;
    gwmi Win32_Share | where Type -eq 0 | Select-Object name,path,status&lt;/P&gt;

&lt;P&gt;I'm having a real hard time finding where to look to see if the command / script are even attempted. I've tried reading splunkd, powershell log, and searching internal.&lt;BR /&gt;
Also, does the source type need to be pre-defined or can it be anything I want?&lt;BR /&gt;
PS new to Splunk but this has been the only hurdle so far.&lt;/P&gt;

&lt;P&gt;Any help is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:44:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-7-powershell-input-not-emitting/m-p/363724#M43918</guid>
      <dc:creator>rmhayes462</dc:creator>
      <dc:date>2020-09-29T16:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk 7 powershell input not emitting</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-7-powershell-input-not-emitting/m-p/363725#M43919</link>
      <description>&lt;P&gt;I've found that from Splunk v6.6+, PowerShell script scheduling is broken (i.e. it runs extremely sporadically, if at all) - there appears to be an issue with sending signals from $SPLUNK_HOME/bin/splunk-powershell.exe to $SPLUNK_HOME/bin/splunk-powershell-common.ps1 - specifically the WaitForWinMultipleObjects statement in the waitCronEvents function just isn't getting anything meaningful to respond to.&lt;/P&gt;

&lt;P&gt;I've raised the issue with Splunk and am awaiting a resolution.&lt;/P&gt;

&lt;P&gt;Short term work-arounds - I've found two (both work for Splunk v6.6, not tested under 7.0.x)&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Replace splunk-powershell.exe with a
version from an earlier version of
Splunk (any of the 6.5.x series
appear to be find)&lt;/LI&gt;
&lt;LI&gt;Deploy the Splunk Add-on for
Microsoft PowerShell
(SA-ModularInput-PowerShell). I
renamed
SA-ModularInput-Powershell\windows_x86_64\Powershell.exe
to PowershellM.exe (ditto for the
associated config file), and updated
the README\inputs.cof.spec  (to
powershellm://default]), in order to
avoid namespace conflicts. Reminder -
the Add On uses a different
scheduler, you'll need to update your
schedule to match.&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:39:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-7-powershell-input-not-emitting/m-p/363725#M43919</guid>
      <dc:creator>jimmoriarty</dc:creator>
      <dc:date>2020-09-29T17:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk 7 powershell input not emitting</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-7-powershell-input-not-emitting/m-p/363726#M43920</link>
      <description>&lt;P&gt;This should now be fixed in v6.6.6.&lt;/P&gt;

&lt;P&gt;Initial testing with this version indicates that PowerShell scripts are being run on schedule again.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 01:00:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-7-powershell-input-not-emitting/m-p/363726#M43920</guid>
      <dc:creator>jimmoriarty</dc:creator>
      <dc:date>2018-02-27T01:00:12Z</dc:date>
    </item>
  </channel>
</rss>

