<?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>Question Re: Shell execute pass - Powershell Hanging in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530179#M107263</link>
    <description>&lt;P&gt;Brandon,&lt;/P&gt;
  &lt;P&gt;in the task parameters of your Shell Execute pass, try adding a line:&lt;/P&gt;
  &lt;P&gt;Parameter name: CLOSEOUTPUTSTREAM&lt;BR /&gt;Parameter value: 1&lt;/P&gt;
  &lt;P&gt;Kind regards,&lt;BR /&gt;Lambert&lt;/P&gt;</description>
    <pubDate>Mon, 28 Aug 2017 08:57:48 GMT</pubDate>
    <dc:creator>lambert-giese</dc:creator>
    <dc:date>2017-08-28T08:57:48Z</dc:date>
    <item>
      <title>Shell execute pass - Powershell Hanging</title>
      <link>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaq-p/530177</link>
      <description>&lt;P&gt;Good morning experts,&lt;BR /&gt;I swear I've seen this problem before but I cannot pinpoint where and searching SCN hasn't yielded results.&lt;/P&gt;
  &lt;P&gt;Anyway, I have a client who's got a Shell execute pass that's doing some work with a CSV file. When the line executes, the Powershell.exe program doesn't seem like it's closing. The instance stays resident in memory until so many instances of it are running in memory that an intervention is necessary to close all the hanging Powershell sessions.&lt;/P&gt;
  &lt;P&gt;Anyone have any ideas how to make sure the Powershell.exe instance exits once the pass has concluded?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 07:37:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaq-p/530177</guid>
      <dc:creator>brandonbollin</dc:creator>
      <dc:date>2017-08-24T07:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Shell execute pass - Powershell Hanging</title>
      <link>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530178#M107262</link>
      <description>&lt;P&gt;Hey Brandon,&lt;/P&gt;
  &lt;P&gt;Are you using any command line parameters? You might need /c with that. I think you need it just about any time you do a shell execute from IDM.&lt;/P&gt;
  &lt;P&gt;You can find a listing of the command line parameters &lt;A target="_blank" href="https://technet.microsoft.com/en-us/library/cc771320%28v=ws.11%29.aspx"&gt;here&lt;/A&gt;.&lt;/P&gt;
  &lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 14:21:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530178#M107262</guid>
      <dc:creator>former_member2987</dc:creator>
      <dc:date>2017-08-24T14:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Shell execute pass - Powershell Hanging</title>
      <link>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530179#M107263</link>
      <description>&lt;P&gt;Brandon,&lt;/P&gt;
  &lt;P&gt;in the task parameters of your Shell Execute pass, try adding a line:&lt;/P&gt;
  &lt;P&gt;Parameter name: CLOSEOUTPUTSTREAM&lt;BR /&gt;Parameter value: 1&lt;/P&gt;
  &lt;P&gt;Kind regards,&lt;BR /&gt;Lambert&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 08:57:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530179#M107263</guid>
      <dc:creator>lambert-giese</dc:creator>
      <dc:date>2017-08-28T08:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Shell execute pass - Powershell Hanging</title>
      <link>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530180#M107264</link>
      <description>&lt;P&gt;Can you share a screenshot of what something like this would look like? I'm not sure I understand this answer. Do you just put, "CLOSEOUTPUTSTREAM = 1" on a new line under the Powershell execution line?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 09:21:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530180#M107264</guid>
      <dc:creator>brandonbollin</dc:creator>
      <dc:date>2017-08-28T09:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Shell execute pass - Powershell Hanging</title>
      <link>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530181#M107265</link>
      <description>&lt;P&gt;I have discussed this answer with our client and they're going to try it. Unfortunately we cannot do this ourselves directly to know if it's successful so I'll update when I have more information. Thanks as always, Matt. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 09:22:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530181#M107265</guid>
      <dc:creator>brandonbollin</dc:creator>
      <dc:date>2017-08-28T09:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Shell execute pass - Powershell Hanging</title>
      <link>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530182#M107266</link>
      <description>&lt;P&gt;You don't find it because "Shell Execute" doesn't offer task parameters at all. My answer was misleading, sorry. &lt;/P&gt;
  &lt;P&gt;You'll need to use a "To Custom" pass instead of "Shell Execute", like so:&lt;/P&gt;
  &lt;BR /&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/63712-arbeitsflache-1-043.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 09:58:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530182#M107266</guid>
      <dc:creator>lambert-giese</dc:creator>
      <dc:date>2017-08-28T09:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Shell execute pass - Powershell Hanging</title>
      <link>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530183#M107267</link>
      <description>&lt;P&gt;I see where you're going with this. Is ToShell a preexisting Java class or would I need to create the class so IDM can call it?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 10:12:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530183#M107267</guid>
      <dc:creator>brandonbollin</dc:creator>
      <dc:date>2017-08-28T10:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Shell execute pass - Powershell Hanging</title>
      <link>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530184#M107268</link>
      <description>&lt;P&gt;It exists and is the same class that would be called when using a "Shell Execute" pass. It's just that "To Custom" is more generic and hence allows passing of parameters like "CLOSEOUTPUTSTREAM", which the more specialized "Shell Execute" UI of MMC doesn't offer - for whatever reason.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 10:32:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530184#M107268</guid>
      <dc:creator>lambert-giese</dc:creator>
      <dc:date>2017-08-28T10:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Shell execute pass - Powershell Hanging</title>
      <link>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530185#M107269</link>
      <description>&lt;P&gt;No worries, Brandon... You should be able to verify this on a test system easily enough as well.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 13:29:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530185#M107269</guid>
      <dc:creator>former_member2987</dc:creator>
      <dc:date>2017-08-28T13:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Shell execute pass - Powershell Hanging</title>
      <link>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530186#M107270</link>
      <description>&lt;P&gt;Test system? I like the world you live in. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2017 11:47:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530186#M107270</guid>
      <dc:creator>brandonbollin</dc:creator>
      <dc:date>2017-08-31T11:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Shell execute pass - Powershell Hanging</title>
      <link>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530187#M107271</link>
      <description>&lt;P&gt;A year ago when I asked this question, we ended up finding another way to do what needed to be done so the PowerShell script portion was eliminated and I forgot about this question. Today, I was running into the same problem but with a different client and came back across this question. I implimented your answer and it worked! Many thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 19:28:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530187#M107271</guid>
      <dc:creator>brandonbollin</dc:creator>
      <dc:date>2018-10-18T19:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Shell execute pass - Powershell Hanging</title>
      <link>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530188#M107272</link>
      <description>&lt;P&gt;If you are using command line you need to add this lines before calling the ps1 file&lt;/P&gt;&lt;P&gt;-NoLogo -Noninteractive -InputFormat None -NoProfile&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2019 17:24:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/shell-execute-pass-powershell-hanging/qaa-p/530188#M107272</guid>
      <dc:creator>former_member525588</dc:creator>
      <dc:date>2019-10-08T17:24:57Z</dc:date>
    </item>
  </channel>
</rss>

