Questions tagged [start-process]

Start-Process is a PowerShell cmdlet that starts one or more processes on the local computer.

Start-Process is a PowerShell cmdlet that starts one or more processes on the local computer. To specify the program that runs in the process, enter an executable file or script file, or a file that can be opened by using a program on the computer. If you specify a non-executable file, Start-Process starts the program that is associated with the file, much like the Invoke-Item cmdlet.

You can use the parameters of Start-Process to specify options, such as loading a user profile, starting the process in a new window, or using alternate credentials.

Output

  • None or System.Diagnostics.Process
    When you use the PassThru parameter, Start-Process generates a System.Diagnostics.Process. Otherwise, this cmdlet does not return any output.
255 questions
0
votes
0 answers

XML file corrupted by other application

I have written two applications and one starts the other one using Process.Start(path_to_app2); App2 starts as expected. Both of the applications save own xml configs files. and sometimes one xml ( that is first written by app 1 ) is overwritten by…
Seba Ja
  • 41
  • 1
  • 5
0
votes
1 answer

Powershell Problem with passing Variables through Start-Process

i have a Problem with a new Script i am working on. This Script includes a Command where i want to execute another Programm with arguments, supportet by this Programm. At first i will get input from the PowerShell script and save this to variables,…
Flighty
  • 13
  • 3
0
votes
3 answers

Specifying complete installation option when running msi from powershell

I am trying to automate the installation of gstreamer on windows using powershell I have the msi file downloaded, and am installing it as shown below PS C:\Users\Administrator> $path =…
Moiz Ahmed
  • 131
  • 2
  • 10
0
votes
0 answers

Run Power shell exe and perform certain steps in that exe

I have an .exe file that I'm running using Start-Process. Once this exe is launched, I want to perform certain steps like click on the 'Next' button or some other button on that exe. How can I perform these actions on a exe through shell…
Tag
  • 209
  • 1
  • 3
  • 7
0
votes
1 answer

Script Launched via Start-Process works 90% of the time - when it "fails", it simply becomes a zombie and doesn't execute 1st line of code

(Solved) Task Scheduler launches a powershell job (no one is logged in, the task has a saved user) that then launches a CMD file from Powershell via Start-Process and that command file successfully launches powershell on another script with the…
0
votes
0 answers

Process ID is not found in the task manager processes after Start-Process using PowerShell

I tried to open a new incognito chrome window and want to close it. $URL = 'www.google.com' $appInstance = Start-Process -FilePath Chrome -passthru -ArgumentList @( '-incognito', $URL, '--new-window') Write-Host "App ID : "…
rAJ
  • 1,295
  • 5
  • 31
  • 66
0
votes
1 answer

Powershell command works manually, but does not work when executed in Jenkins

I'm having a strange scenario where my command works on PowerShell manually but not when executed on Jenkins PowerShell plugin. I'm new to PowerShell and Jenkins and I'm thinking that there's a rule I'm missing. I looked all over the here and net…
0
votes
1 answer

Powershell Start-Process bugs out when using credentials

So I've set up some credentials to be imported from an encrypted text file, an am trying to use them in conjunction with the 'start process' cmdlet. I'm new to powershell so cld be missing smoething obvious, but if i type Start-Process…
E-A
  • 179
  • 12
0
votes
0 answers

.net alternative to Start-Process

I am using powershell to manage a benchmark of Autodesk's Revit product. It uses Start-Process -wait to run Revit with a journal file as an argument, and the journal file allows for consistently repeating the same test. The issue I am seeing is that…
Gordon
  • 6,257
  • 6
  • 36
  • 89
0
votes
0 answers

Why don't the applications run by Powershell appear on remote desktop but appear in task manager?

I'm using Windows Powershell to access virtual machines. When I try to run a program using Powershell by "Start-Process notepad.exe" or ".\notepad.exe", The notepad seems to appear in task manager but doesn't appear on the desktop. I use…
0
votes
1 answer

Send emails with Powershell mailto with formated text

My current script creates (after an account modification) a .ps1 file that is send to another computer and there it is executed opening a new Gmail tab with some information hosted in several variables. I need this email to have format like bold,…
0
votes
0 answers

How do I start a Windows 7 console with a newly modified system environment?

I have written a (very simple) little Python script, and I want to be able to distribute it to friends who have no idea what Python is, nor anything about Windows cmd scripts. Fundamentally I need to install Python on their systems, followed by…
David I. McIntosh
  • 2,038
  • 4
  • 23
  • 45
0
votes
1 answer

Strange behaviour, when using powershell Start-Process on local computer with credentials

I have task in windows scheduler. It runs powershell script ScriptScheduler.ps1 under Domain\User1. This script run another one GenerateAndApplyACLforMultipleProjects.ps1 with credential Domain\User2. When i am run it interactively under…
0
votes
1 answer

Invoke-Expression parameter not being used

I have a working, simple batch file cmd: D:\Software\MySoftware.exe --process MyConfig.tuc When I try to replicate in Powershell using either Invoke-Expression or the call operator '&', the code executes but the log indicates it has not picked up…
felixmc
  • 516
  • 1
  • 4
  • 19
0
votes
1 answer

How to run batch "Start" from powershell

In a Powershell script I would like to launch a process (a java program) using the batch "Start" command. The reason for using this is that I would like to have control over process priority as well as the CPU numa node and affinity assignment, and…
Hove
  • 1