Powershell HP SSM.exe

This topic contains 1 reply, has 2 voices, and was last updated by  postanote 3 weeks ago.

  • Author
    Posts
  • #103538

    MvW
    Participant

    can someone help me to run the cmdline below to let it run in a powershell script.

    SSM.exe . /ACCEPT /S /DEBUG /to:5 /Force /edebug /cpwdfile:%~dp0\Password.bin /SORT:DESCENDING /NOREBOOT /LOG:%PROGRAMDATA%\SSMLOGS

  • #103561

    postanote
    Participant

    FYI...
    Review the articles below

    PowerShell: Running Executables
    There are several different methods for running executables as well as invoking code.
    How do you know which one to use for the job? Here is an outline of the methods with examples and general use.
    https://social.technet.microsoft.com/wiki/contents/articles/7703.powershell-running-executables.aspx

    # The problem with calling legacy/native apps from PowerShell
    'huddledmasses.org/the-problem-with-calling-legacy-or-native-apps-from-powershell'

    # PowerShell V3 CTP2 Provides Better Argument Passing to EXEs (Keith Hill MVP)
    Start-Process
    "rkeithhill.wordpress.com/2012/01/02/powershell-v3-ctp2-provides-better-argument-passing-to-exes'

    # PowerShell and external commands done right
    Start-Process
    'edgylogic.com/blog/powershell-and-external-commands-done-right'

    # or try

    $ConsoleCommand = 'SSM.exe . /ACCEPT /S /DEBUG /to:5 /Force /edebug /cpwdfile:%~dp0\Password.bin /SORT:DESCENDING /NOREBOOT /LOG:%PROGRAMDATA%\SSMLOGS'
    Start-Process powershell.exe -ArgumentList "-NoExit","-Command  &{ $ConsoleCommand }" -Wait
    
    # Or
    Start-Process -FilePath 'SSM.exe' -ArgumentList '/ACCEPT /S /DEBUG /to:5 /Force /edebug /cpwdfile:%~dp0\Password.bin /SORT:DESCENDING /NOREBOOT /LOG:%PROGRAMDATA%\SSMLOGS'
    
    # Or this
    Start-Process -FilePath 'SSM.exe' -ArgumentList '/ACCEPT', '/S', '/DEBUG', '/to:5', '/Force', '/edebug', '/cpwdfile:%~dp0\Password.bin', '/SORT:DESCENDING', '/NOREBOOT', '/LOG:%PROGRAMDATA%\SSMLOGS'
    

You must be logged in to reply to this topic.