<?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: Run PowerShell Core scripts on Universal Forwarder in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Run-PowerShell-Core-scripts-on-Universal-Forwarder/m-p/700386#M115987</link>
    <description>&lt;P&gt;At the moment there is apparently no such input type. You can always check if someone already had that idea on &lt;A href="https://ideas.splunk.com" target="_blank"&gt;https://ideas.splunk.com&lt;/A&gt; and back it up. If there isn't one, create a new one.&lt;/P&gt;</description>
    <pubDate>Fri, 27 Sep 2024 20:44:17 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2024-09-27T20:44:17Z</dc:date>
    <item>
      <title>Run PowerShell Core scripts on Universal Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Run-PowerShell-Core-scripts-on-Universal-Forwarder/m-p/700335#M115981</link>
      <description>&lt;P&gt;Is there a native way to run scripts in pwsh.exe managed environment?&lt;/P&gt;&lt;P&gt;It's not mentioned in docs so I believe not:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.3.1/Admin/Inputsconf" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/9.3.1/Admin/Inputsconf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We all know there is [powershell://&amp;lt;name&amp;gt;] in inputs.conf to run "classic" powershell scripts. Actually, it runs script in "classic" PowerShell environment. Depending on which Windows version/build Universal Forwarder is installed on, it will be PS version up to 5.1 (which is managed by powershell.exe binary btw).&lt;/P&gt;&lt;P&gt;But now we have a brand-new PowerShell Core (managed by a different binary: pwsh.exe). PowerShell Core have new features, not available in "classic" PowerShell and they're not 100% compatible. Additionally, PowerShell Core is platform agnostic - so we can install it on Linux and run PowerShell Core based scripts there (don't ask me why anyone would do that, but it's possible).&lt;/P&gt;&lt;P&gt;Currently I'm running PowerShell Core scripts, by starting batch script in cmd environment, then cmd starts pwsh.exe with defined parameter to run my PowerShell Core based script - not elegant at all.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 12:01:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Run-PowerShell-Core-scripts-on-Universal-Forwarder/m-p/700335#M115981</guid>
      <dc:creator>TomaszOledzki</dc:creator>
      <dc:date>2024-09-27T12:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Run PowerShell Core scripts on Universal Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Run-PowerShell-Core-scripts-on-Universal-Forwarder/m-p/700386#M115987</link>
      <description>&lt;P&gt;At the moment there is apparently no such input type. You can always check if someone already had that idea on &lt;A href="https://ideas.splunk.com" target="_blank"&gt;https://ideas.splunk.com&lt;/A&gt; and back it up. If there isn't one, create a new one.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 20:44:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Run-PowerShell-Core-scripts-on-Universal-Forwarder/m-p/700386#M115987</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-09-27T20:44:17Z</dc:date>
    </item>
  </channel>
</rss>

