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.
204 questions
0
votes
2 answers

how to execute commands on remote machine using pysphere

Have VMware VM on which i wanted to execute some commands for example shutdown /r or dir /o:d etc... from remote machine. Using module pysphere module for communicating with VM. i tried start_process but it is just creating process for cmd.exe my…
rocky
  • 79
  • 3
  • 16
0
votes
2 answers

VB.net 2010 Window Service Run the actual application not just the process

Here is what I am trying to do is create a service that checks if Microsoft Lync is running. If it's running then do nothing but write to eventlog. If it's not running run the exe and then log in to Lync. The problem I am getting is when it comes…
Jose Ortiz
  • 579
  • 1
  • 7
  • 16
0
votes
2 answers

Using Start-Process for starting a process having its full command line

How can I use PowerShell's Start-Process cmdlet to start a process using its full command line (with executable path and arguments). For instance let I have the following line "/myprog.exe" -arg1 "val1" -arg2 "val2" stored on some string…
Mihran Hovsepyan
  • 10,110
  • 13
  • 57
  • 108
0
votes
2 answers

Using Start-process to kick off a LogParser process, error encountered

I'm using the following code to try to use Log Parser to fire off and dump the contents of a .csv file I have into a SQL database. I'm having to try to use a custom function to strip out non-alphanumeric characters so that the columns can be created…
Sean Long
  • 2,125
  • 5
  • 23
  • 43
0
votes
1 answer

PowerShell Start-Process

Can ssomebody help ti run new process in the same window?? $credential = Get-Credential Start-Process powershell.exe -Credential $credential -NoNewWindow -ArgumentList ".\ListScript.ps1" -Wait Write-Host "Press any key to continue ..." $x =…
user1235794
  • 11
  • 1
  • 4
0
votes
1 answer

Run logon PowerShell Start-Process not as administrator

I'm running PowerShell scripts at logon by: Run: gpedit.msc -> Local Group Policy Editor -> User Configuration -> Windows Settings -> Scripts (Logon/Logoff) -> Logon -> PowerShell Scripts -> Add -> Browse In the script, I'm…
-1
votes
2 answers

Command prompt window opens and closes immediately while running powershell script

I'm trying to run a powershell script as follows: Start-Process -FilePath "C:\svn\Services\trunk\Services.In4m.Agent.Host\bin\agent.exe" -Argument --help Any reason why this could be happening. Also, how to write a script so that the command prompt…
-1
votes
2 answers

Powershell LogonScript How to keep just started process open

I made a quick powershell script with some tasks for updating outlook signature with infos from AD and some unmounting and mounting network shares. Also, the script starts an application on the local computer. The Application starts just fine but,…
tboston
  • 11
  • 4
1 2 3
13
14