<?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: How to troubleshoot why my PowerShell scripted input is not being run? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-troubleshoot-why-my-PowerShell-scripted-input-is-not/m-p/282197#M53940</link>
    <description>&lt;P&gt;That's great news.&lt;BR /&gt;
If you are happy with the answer then could you mark is as "answered" so that others can benefit from it?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
J&lt;/P&gt;</description>
    <pubDate>Fri, 18 Dec 2015 10:57:21 GMT</pubDate>
    <dc:creator>javiergn</dc:creator>
    <dc:date>2015-12-18T10:57:21Z</dc:date>
    <item>
      <title>How to troubleshoot why my PowerShell scripted input is not being run?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-troubleshoot-why-my-PowerShell-scripted-input-is-not/m-p/282193#M53936</link>
      <description>&lt;P&gt;I've set up a new scripted input using powershell as follows:&lt;/P&gt;

&lt;P&gt;Inputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[script://$SPLUNK_HOME\bin\scripts\RESENDREQUEST.path]
source = RESENDREQUESTLOG
sourcetype = RESENDREQUESTLOG
interval = 10
disabled = 0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Created RESENDREQUEST.path in $SPLUNK_HOME\bin\scripts:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe -file "C:\Program Files\SplunkUniversalForwarder\bin\scripts\RESENDREQUEST.ps1"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now, powershell isn't being run and I see no errors in the splunkd.log file.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;

&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2015 14:01:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-troubleshoot-why-my-PowerShell-scripted-input-is-not/m-p/282193#M53936</guid>
      <dc:creator>mark19632</dc:creator>
      <dc:date>2015-12-17T14:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to troubleshoot why my PowerShell scripted input is not being run?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-troubleshoot-why-my-PowerShell-scripted-input-is-not/m-p/282194#M53937</link>
      <description>&lt;P&gt;You can use some tools such as &lt;CODE&gt;runas.exe&lt;/CODE&gt; or &lt;CODE&gt;psexec.exe&lt;/CODE&gt; to run the same powershell command as the user splunk is running as to see what happens.  &lt;/P&gt;

&lt;P&gt;You may be running into an issue related to the execution policy of the machine you're on.  See &lt;CODE&gt;Get-ExecutionPolicy&lt;/CODE&gt; and &lt;CODE&gt;Set-ExecutionPolicy&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;runas.exe&lt;/CODE&gt; and &lt;CODE&gt;psexec&lt;/CODE&gt; are console apps, so you can execute them at command prompt. Open a command prompt with administrative rights on the Universal Forwarder and try the following:&lt;/P&gt;

&lt;P&gt;If splunk is running as system user, do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; psexec -i -s '"%SystemRoot%\System32\Windows\PowerShell\v1.0\powershell.exe -file "C:\Program Files\SplunkUniversalForwarder\bin\scripts\RESENDREQUEST.ps1"'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If splunk is running as another user, do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;runas /noprofile /env /user:domain\username '"%SystemRoot%\System32\Windows\PowerShell\v1.0\powershell.exe -file "C:\Program Files\SplunkUniversalForwarder\bin\scripts\RESENDREQUEST.ps1"'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If it runs remote connections as it appears it does... you probably want to add  &lt;CODE&gt;/netonly&lt;/CODE&gt; to the runas&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2015 15:05:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-troubleshoot-why-my-PowerShell-scripted-input-is-not/m-p/282194#M53937</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2015-12-17T15:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to troubleshoot why my PowerShell scripted input is not being run?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-troubleshoot-why-my-PowerShell-scripted-input-is-not/m-p/282195#M53938</link>
      <description>&lt;P&gt;If you are running 6.3 PowerShell is supported natively:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.0/Data/MonitorWindowsDatawithPowerShellscripts"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.0/Data/MonitorWindowsDatawithPowerShellscripts&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If not I would probably go and install the PowerShell add-on:&lt;BR /&gt;
&lt;A href="https://splunkbase.splunk.com/app/1477/"&gt;https://splunkbase.splunk.com/app/1477/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If you can't (or don't want) to install the add-on, then double check paths and quotes in your scripts as this is usually the most common source of error. See this other &lt;A href="https://answers.splunk.com/answers/242463/powershell-script-through-inputsconf.html"&gt;post&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
J&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2015 16:19:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-troubleshoot-why-my-PowerShell-scripted-input-is-not/m-p/282195#M53938</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2015-12-17T16:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to troubleshoot why my PowerShell scripted input is not being run?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-troubleshoot-why-my-PowerShell-scripted-input-is-not/m-p/282196#M53939</link>
      <description>&lt;P&gt;So it does!   &lt;/P&gt;

&lt;P&gt;All working now and much simpler.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2015 21:26:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-troubleshoot-why-my-PowerShell-scripted-input-is-not/m-p/282196#M53939</guid>
      <dc:creator>mark19632</dc:creator>
      <dc:date>2015-12-17T21:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to troubleshoot why my PowerShell scripted input is not being run?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-troubleshoot-why-my-PowerShell-scripted-input-is-not/m-p/282197#M53940</link>
      <description>&lt;P&gt;That's great news.&lt;BR /&gt;
If you are happy with the answer then could you mark is as "answered" so that others can benefit from it?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
J&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2015 10:57:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-troubleshoot-why-my-PowerShell-scripted-input-is-not/m-p/282197#M53940</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2015-12-18T10:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to troubleshoot why my PowerShell scripted input is not being run?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-troubleshoot-why-my-PowerShell-scripted-input-is-not/m-p/282198#M53941</link>
      <description>&lt;P&gt;He could mark it as the answer, but he might want to change his question if so.  &lt;/P&gt;

&lt;P&gt;I gave steps on troubleshooting powershell, you hit the nail on the head as to his root issue.  The question doesnt mention latest Splunk.  &lt;/P&gt;

&lt;P&gt;Good to know it has native support now!&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2015 12:00:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-troubleshoot-why-my-PowerShell-scripted-input-is-not/m-p/282198#M53941</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2015-12-18T12:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to troubleshoot why my PowerShell scripted input is not being run?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-troubleshoot-why-my-PowerShell-scripted-input-is-not/m-p/673246#M112759</link>
      <description>&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/9.1.2308/Data/MonitorWindowsdatawithPowerShellscripts" target="_blank"&gt;Monitor Windows data with PowerShell scripts - Splunk Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the update link to docs.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 16:26:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-troubleshoot-why-my-PowerShell-scripted-input-is-not/m-p/673246#M112759</guid>
      <dc:creator>youngsuh</dc:creator>
      <dc:date>2024-01-04T16:26:02Z</dc:date>
    </item>
  </channel>
</rss>

