SOLVED

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

%3CLINGO-SUB%20id%3D%22lingo-sub-1323633%22%20slang%3D%22en-US%22%3EHow%20to%20install%20the%20.exe%20installer%20with%20Powershell%20on%20remote%20machine%20in%20non-interactive%20mode%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1323633%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20a%20help%20to%20install%20the%20one%20.exe%20installer%20on%20my%20remote%20machines%20which%20required%20be%20setup%20with%20Azure%20Devops%20activity.%20I%20want%20for%20exe%20but%20not%20for%20msi.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20below%20option%20but%20couldn't%20make%20it%20successful.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPowerShell%20Script%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EInvoke-Command%20-ComputerName%20%24computer%20-ScriptBlock%20%7B%26nbsp%3B%3CSPAN%3EStart-Process%20C%3A%5CUsers%5Csomeexe.exe%20-ArgumentList%20%2Fsilent%20-Wait%20-NoNewWindow%26nbsp%3B%20%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EError%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EStart-Process%20%3A%20This%20command%20cannot%20be%20run%20due%20to%20the%20error%3A%20The%20requested%20operation%20requires%20elevation.%3CBR%20%2F%3EAt%20line%3A16%20char%3A1%3CBR%20%2F%3E%2B%20Start-Process%20C%3A%5CUsers%5Csomeexe.exe%20-ArgumentLi%20...%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20InvalidOperation%3A%20(%3A)%20%5BStart-Process%5D%2C%20InvalidOperationException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20InvalidOperationException%2CMicrosoft.PowerShell.Commands.StartProcessCommand%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%40All%20please%20help%20me%20on%20this.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1323633%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1323916%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20install%20the%20.exe%20installer%20with%20Powershell%20on%20remote%20machine%20in%20non-interactive%20mode%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1323916%22%20slang%3D%22en-US%22%3E%3CP%3EAs%20the%20error%20message%20clearly%20suggests%2C%20you%20need%20to%20run%20this%20cmdlet%20elevated%20(as%20admin)%20on%20the%20remote%20machine.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1324193%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20install%20the%20.exe%20installer%20with%20Powershell%20on%20remote%20machine%20in%20non-interactive%20mode%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1324193%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20tried%20that%20and%20it%20removed%20the%20error%20but%20my%20requirement%20is%20not%20achieved%20as%20it%20launch%20the%20installer%20in%20interactive%20mode.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20any%20option%20to%20run%20in%20non-inerecative%20mode.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1325285%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20install%20the%20.exe%20installer%20with%20Powershell%20on%20remote%20machine%20in%20non-interactive%20mode%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1325285%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20can%20use%20tools%20such%20as%20psexec%20for%20that.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1327230%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20install%20the%20.exe%20installer%20with%20Powershell%20on%20remote%20machine%20in%20non-interactive%20mode%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1327230%22%20slang%3D%22en-US%22%3Elargely%20depends%20on%20the%20.EXE%20%3B%20review%20documentation%20for%20any%20command%20line%20switches%20for%20quiet%2Fnon-interactive%20mode.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1331119%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20install%20the%20.exe%20installer%20with%20Powershell%20on%20remote%20machine%20in%20non-interactive%20mode%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1331119%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20You.%20I%20tried%20to%20go%20more%20detailed%20in%20exe%20and%20found%20the%20solution%20to%20do%20the%20non-interactive%20mode%20installation.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1333963%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20install%20the%20.exe%20installer%20with%20Powershell%20on%20remote%20machine%20in%20non-interactive%20mode%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1333963%22%20slang%3D%22en-US%22%3Eawesome.%20good%20to%20know%20it%20worked%20for%20you.%3C%2FLINGO-BODY%3E
New Contributor

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.

6 Replies

As the error message clearly suggests, you need to run this cmdlet elevated (as admin) on the remote machine.

@Vasil Michev  

 

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.

You can use tools such as psexec for that.

best response confirmed by ashkumar1989 (New Contributor)
Solution
largely depends on the .EXE ; review documentation for any command line switches for quiet/non-interactive mode.

Thank You. I tried to go more detailed in exe and found the solution to do the non-interactive mode installation.

awesome. good to know it worked for you.