<?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: Get command arguments in Powershell scripts in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/get-command-arguments-in-powershell-scripts/m-p/512910#M1136</link>
    <description>&lt;P&gt;I do not use Cortex, but I believe the above accepted response is meaning that when you go into Cortex and create a new automation script, selecting Powershell as the script type, some sample code will appear in the new automation script. The sample is not in the post above (except for the example variable definition).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See the Cortex Automations Playbook document on creating new scripts and the script helper page:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.paloaltonetworks.com/cortex/cortex-xsoar/6-6/cortex-xsoar-admin/playbooks/automations" target="_blank" rel="noopener"&gt;https://docs.paloaltonetworks.com/cortex/cortex-xsoar/6-6/cortex-xsoar-admin/playbooks/automations&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://xsoar.pan.dev/docs/concepts/xsoar-ide#the-script-helper" target="_blank" rel="noopener"&gt;https://xsoar.pan.dev/docs/concepts/xsoar-ide#the-script-helper&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Aug 2022 23:08:46 GMT</pubDate>
    <dc:creator>Adrian_Jensen</dc:creator>
    <dc:date>2022-08-24T23:08:46Z</dc:date>
    <item>
      <title>Get command arguments in Powershell scripts</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/get-command-arguments-in-powershell-scripts/m-p/381906#M106</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to get Command-Arguments in a self-made script in Powershell.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On Python it is:&lt;BR /&gt;demisto.args().get('&amp;lt;command-argument&amp;gt;')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is it in Powershell? Because I tried it with:&lt;BR /&gt;$demisto.Args()["&amp;lt;command-argument&amp;gt;"]&lt;/P&gt;&lt;P&gt;But this didn't worked on my self-made script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="item"&gt;&lt;DIV class="header"&gt;&lt;SPAN&gt;(Cortex XSOAR Version:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;6.0.2&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Build:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;94597)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;roger&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 14:31:38 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/get-command-arguments-in-powershell-scripts/m-p/381906#M106</guid>
      <dc:creator>r_buchwalder</dc:creator>
      <dc:date>2021-01-25T14:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Get command arguments in Powershell scripts</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/get-command-arguments-in-powershell-scripts/m-p/381921#M107</link>
      <description>&lt;P&gt;You can get the args passed in like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$value = $demisto.Args().value&lt;/P&gt;&lt;P&gt;$demisto.Results($value)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you create a new automation script, and switch the type to Powershell, there is some example code provided.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 15:01:51 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/get-command-arguments-in-powershell-scripts/m-p/381921#M107</guid>
      <dc:creator>MBeauchamp2</dc:creator>
      <dc:date>2021-01-25T15:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Get command arguments in Powershell scripts</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/get-command-arguments-in-powershell-scripts/m-p/382123#M108</link>
      <description>&lt;P&gt;Thank you MBeauchamp&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That helped me. My script is now runinng &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;roger&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 09:52:15 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/get-command-arguments-in-powershell-scripts/m-p/382123#M108</guid>
      <dc:creator>r_buchwalder</dc:creator>
      <dc:date>2021-01-26T09:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Get command arguments in Powershell scripts</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/get-command-arguments-in-powershell-scripts/m-p/512895#M1135</link>
      <description>&lt;P&gt;Well, maybe it is the age of the post, but the "there is some example code provided" does not show any sample code nor have any links, even if you click (multiple times) on "View solution in original post".&amp;nbsp; A real let down when the reply from the question asker is, "That helped me. My script is now running" (ok, "runinng") so don't come after me the spelling police.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 19:42:59 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/get-command-arguments-in-powershell-scripts/m-p/512895#M1135</guid>
      <dc:creator>Bobwford</dc:creator>
      <dc:date>2022-08-24T19:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Get command arguments in Powershell scripts</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/get-command-arguments-in-powershell-scripts/m-p/512910#M1136</link>
      <description>&lt;P&gt;I do not use Cortex, but I believe the above accepted response is meaning that when you go into Cortex and create a new automation script, selecting Powershell as the script type, some sample code will appear in the new automation script. The sample is not in the post above (except for the example variable definition).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See the Cortex Automations Playbook document on creating new scripts and the script helper page:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.paloaltonetworks.com/cortex/cortex-xsoar/6-6/cortex-xsoar-admin/playbooks/automations" target="_blank" rel="noopener"&gt;https://docs.paloaltonetworks.com/cortex/cortex-xsoar/6-6/cortex-xsoar-admin/playbooks/automations&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://xsoar.pan.dev/docs/concepts/xsoar-ide#the-script-helper" target="_blank" rel="noopener"&gt;https://xsoar.pan.dev/docs/concepts/xsoar-ide#the-script-helper&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 23:08:46 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/get-command-arguments-in-powershell-scripts/m-p/512910#M1136</guid>
      <dc:creator>Adrian_Jensen</dc:creator>
      <dc:date>2022-08-24T23:08:46Z</dc:date>
    </item>
  </channel>
</rss>

