<?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 should you specify the script file for PowerShell Modular Inputs in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-should-you-specify-the-script-file-for-PowerShell-Modular/m-p/282291#M53949</link>
    <description>&lt;P&gt;Hi @martinho&lt;/P&gt;

&lt;P&gt;Your hyperlinks won't appear because you need a minimum of at least 50 karma points to post live links. You're going to have to edit your answer and actually paste the URLs you're trying to share with the community so people can copy and paste it themselves.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Oct 2016 22:41:42 GMT</pubDate>
    <dc:creator>ppablo</dc:creator>
    <dc:date>2016-10-27T22:41:42Z</dc:date>
    <item>
      <title>How should you specify the script file for PowerShell Modular Inputs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-should-you-specify-the-script-file-for-PowerShell-Modular/m-p/282289#M53947</link>
      <description>&lt;P&gt;The &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/MonitorWindowsdatawithPowerShellscripts"&gt;documentation for the PowerShell Modular Input&lt;/A&gt; states &lt;EM&gt;When you specify a script file (.ps1), prepend the script name with a period and a space (". ")&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;This is &lt;EM&gt;dot sourcing&lt;/EM&gt; the script and means that any script scope variables will persist after the script has completed and can lead to subtle bugs during subsequent executions of the script. I think it would be better to use the call operator &lt;STRONG&gt;&amp;amp;&lt;/STRONG&gt; instead. Read the &lt;BR /&gt;
&lt;A href="https://technet.microsoft.com/en-us/library/hh847732.aspx"&gt;PowerShell about_Operators documentation&lt;/A&gt; for the details about these operators.&lt;/P&gt;

&lt;P&gt;This applies to the documenation for 6.3.1 through to 6.5 when I last checked.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2016 03:46:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-should-you-specify-the-script-file-for-PowerShell-Modular/m-p/282289#M53947</guid>
      <dc:creator>martinho</dc:creator>
      <dc:date>2016-10-27T03:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: How should you specify the script file for PowerShell Modular Inputs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-should-you-specify-the-script-file-for-PowerShell-Modular/m-p/282290#M53948</link>
      <description>&lt;P&gt;I'm pretty sure the &lt;A href="http://ss64.com/ps/call.html"&gt;&amp;amp; call operator&lt;/A&gt; is the right way to go and using &lt;A href="http://ss64.com/ps/call.html"&gt;&amp;amp;&lt;/A&gt; definitely works. Looking at the comments in the documentation, it looks like a user suggested using the &lt;A href="http://ss64.com/ps/source.html"&gt;. dot source&lt;/A&gt; operator and a moderator accepted this suggestion without understanding the difference.&lt;/P&gt;

&lt;P&gt;For some reason the hyperlinks are not working in the question markdown so I'm repeating them here&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/MonitorWindowsdatawithPowerShellscripts"&gt;Splunk documentation for the PowerShell Modular Input&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://technet.microsoft.com/en-us/library/hh847732.aspx"&gt;PowerShell Operators documentation&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://technet.microsoft.com/en-us/library/hh847849.aspx"&gt;PowerShell Scopes documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2016 22:37:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-should-you-specify-the-script-file-for-PowerShell-Modular/m-p/282290#M53948</guid>
      <dc:creator>martinho</dc:creator>
      <dc:date>2016-10-27T22:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: How should you specify the script file for PowerShell Modular Inputs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-should-you-specify-the-script-file-for-PowerShell-Modular/m-p/282291#M53949</link>
      <description>&lt;P&gt;Hi @martinho&lt;/P&gt;

&lt;P&gt;Your hyperlinks won't appear because you need a minimum of at least 50 karma points to post live links. You're going to have to edit your answer and actually paste the URLs you're trying to share with the community so people can copy and paste it themselves.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2016 22:41:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-should-you-specify-the-script-file-for-PowerShell-Modular/m-p/282291#M53949</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2016-10-27T22:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: How should you specify the script file for PowerShell Modular Inputs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-should-you-specify-the-script-file-for-PowerShell-Modular/m-p/282292#M53950</link>
      <description>&lt;P&gt;Ah - interesting. Thanks for the insight. Pretty poor user experience though &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
Looks like this site is an older self hosted version of the Stack Exchange engine. Might have been better to go with a hosted version so it gets maintained.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2016 22:49:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-should-you-specify-the-script-file-for-PowerShell-Modular/m-p/282292#M53950</guid>
      <dc:creator>martinho</dc:creator>
      <dc:date>2016-10-27T22:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: How should you specify the script file for PowerShell Modular Inputs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-should-you-specify-the-script-file-for-PowerShell-Modular/m-p/282293#M53951</link>
      <description>&lt;P&gt;@ppablo I don't have enough reputation to make more than 2 posts / edits a day. Sigh - the troubles of a second class citizien...&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2016 22:57:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-should-you-specify-the-script-file-for-PowerShell-Modular/m-p/282293#M53951</guid>
      <dc:creator>martinho</dc:creator>
      <dc:date>2016-10-27T22:57:25Z</dc:date>
    </item>
  </channel>
</rss>

