How to run the exe file to upgrade software RRS feed

  • Question

  • Hello

    I am upgrading the software on remote machine-how do i run this command in powershell?

    c:\temp\exe\saphostexec.exe -upgrade -archive c:\Program Files\sap\hostctrl\exe\SAPHOSTAGENT40_40-20009417.SAR



    • Moved by jrv Thursday, November 7, 2019 12:45 AM Off topic - vendor specific issues
    Sunday, October 27, 2019 7:27 PM

All replies

  • What is the issue. Just run it. There is no trick except you need to quote your archive path.


    Sunday, October 27, 2019 8:02 PM
  • Hi,

    Thanks for your question.

    Do you mean you need to run the command remotely?

    Please try to use the Invoke-command cmdlet to do it.


    For example:

    Invoke-Command -ComputerName Server01 -Credential Domain01\User01 -ScriptBlock { c:\temp\exe\saphostexec.exe -upgrade -archive "c:\Program Files\sap\hostctrl\exe\SAPHOSTAGENT40_40-20009417.SAR" }

    Best regards,


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, October 28, 2019 7:12 AM
  • The saphostexec.exe file triggers the upgrade and it is under C:\program files\SAP\hostctrl\exe.

    I need to pass parameters -upgrade and -archive and give the location of the SAR file at the end.

    c:\program files\ABC\abcexec.exe -upgrade -archive c:\temp\xxxx.SAR

    If i actually run it from that location from powershell command line-it should be like this

    .\saphostexec.exe -upgrade -version c:\temp\xxxx.SAR

    Invoke-Command -ComputerName $_ -Credential $creds -ScriptBlock {'c:\program files\ABC\abcexec.exe -upgrade -archive c:\temp\xxxx.SAR''}

    Thursday, November 7, 2019 12:10 AM
  • Sorry but this is not a Saphos forum. Please post to the vendors forum for assistance.


    Thursday, November 7, 2019 12:44 AM
  • Never mind.Its working now :)
    Thursday, November 7, 2019 5:35 PM