Forum Discussion

ashkumar1989's avatar
ashkumar1989
Copper Contributor
Apr 21, 2020

How to install the .exe installer with Powershell on remote machine in non-interactive mode

Hi All,

 

I need a help to install the one .exe installer on my remote machines which required be setup with Azure Devops activity. I want for exe but not for msi.

 

I tried below option but couldn't make it successful.

 

PowerShell Script: 

 

Invoke-Command -ComputerName $computer -ScriptBlock { Start-Process C:\Users\someexe.exe -ArgumentList /silent -Wait -NoNewWindow  }

 

Error: 

 

Start-Process : This command cannot be run due to the error: The requested operation requires elevation.
At line:16 char:1
+ Start-Process C:\Users\someexe.exe -ArgumentLi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

 

 

@All please help me on this.

  • largely depends on the .EXE ; review documentation for any command line switches for quiet/non-interactive mode.
  • As the error message clearly suggests, you need to run this cmdlet elevated (as admin) on the remote machine.

    • ashkumar1989's avatar
      ashkumar1989
      Copper Contributor

      VasilMichev  

       

      I have tried that and it removed the error but my requirement is not achieved as it launch the installer in interactive mode.

       

      Is there any option to run in non-inerecative mode.

      • Animesh Joshi's avatar
        Animesh Joshi
        Brass Contributor
        largely depends on the .EXE ; review documentation for any command line switches for quiet/non-interactive mode.

Resources