Powershell HP SSM.exe

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

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


PowerShell V3 CTP2 Provides Better Argument Passing to EXEs (Keith Hill MVP)

'‘PowerShell V3 CTP2 Provides Better Argument Passing to EXEs | Keith Hill's 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'