This topic contains 17 replies, has 8 voices, and was last updated by
Luc FULLENWARTH
Deploy Exe With Powershell
When PowerShell detects “oldie but goodie” command-line tools such as nslookup, ipconfig, and net, the parser fires up an on-the-spot Cmd.exe instance and gives temporary control to those programs. Let’s use a practical example to illustrate.
PowerShell Scripts to Install Application (EXE) or Update (MSU) using GPO This contains two PowerShell scripts that will install either an Application or an Windows QFE Update. These scripts are designed to be used with Startup/Logon GPO scripts to install these updates.
My end game is to wrap this in invoke-command, to feed a list of PCs, and run the exe on all of them. For now, i'm just trying to run an exe with parameters from powershell. I can run it from a command line and from a scheduled task. But not from powershell. The argument list has a bunch of quotes and backslashes in it.
PS2EXE-GUI: 'Convert' PowerShell Scripts to EXE Files with GUI Overworking of the great script of Ingo Karstein with GUI support. The GUI output and input is activated with one switch, real windows executables are generated.
8 months, 1 week ago.
The very first thing I need to do is install AutoIt, which will be used to run some portions of the install. The script is autoit-v3-setup.exe which brings up an Install Wizard. Since it's an.exe and not an.msi, how do I have Powershell run through the Wizard (defaults all the way) and finish before moving on.
Powershell Command To Install Exe Download
If you run: Start-Process 'c:tempInstall.exe /install /quiet /norestart ' on the local machine, does it install?
When using Invoke-Command on remote machines aren't credentials needed?
Try the solution provided here: https://powershell.org/forums/topic/need-to-run-exe-with-parameters-on-multiple-remote-machines/
[PHLWQ40A] Connecting to remote server server01 failed with the following error message: Access is denied.
This looks more like a remoting problem...
Please try this first to confirm remoting is working fine:
If this works try interactively in this remote session
You've confirmed the install.exe copied over and is located in the C:Temp folder on the remote machine? If so, then when you run the Start-Process in the Invoke-Command you probably need to use the -Wait parameter. It's likely the install.exe starts but is never allowed to finish because the session is closed right after the scriptblock runs.
Try this:
Invoke-Command has the -AsJob parameter you could try or wrap your code in the scriptblock of Start-Job.
I agree with John.
Just to illustrate:
Then you can check the status of all jobs with:
As soon as all jobs are finished, retrieve the result with:
Powershell Command To Install Exe File
The topic ‘Running an executable on a remote computer using Invoke-Command’ is closed to new replies.