Skip to Content

Shell execute pass - Powershell Hanging

Good morning experts,
I swear I've seen this problem before but I cannot pinpoint where and searching SCN hasn't yielded results.

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.

Anyone have any ideas how to make sure the Powershell.exe instance exits once the pass has concluded?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Aug 28, 2017 at 08:57 AM

    Brandon,

    in the task parameters of your Shell Execute pass, try adding a line:

    Parameter name: CLOSEOUTPUTSTREAM
    Parameter value: 1

    Kind regards,
    Lambert

    Add comment
    10|10000 characters needed characters exceeded

    • 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.

  • Aug 24, 2017 at 02:21 PM

    Hey Brandon,

    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.

    You can find a listing of the command line parameters here.

    Matt

    Add comment
    10|10000 characters needed characters exceeded