The Start-Process
cmdlet in PowerShell is used to start one or more processes on the local computer. It allows users to launch external programs, executables, scripts, or documents from within a PowerShell session
Here’s how to use Start-Process
:
- Open PowerShell by searching for it in the Start menu or by pressing Win + X and selecting “Windows PowerShell” or “Windows PowerShell (Admin)”.
- Once PowerShell is open, you can use the
Start-Process
cmdlet followed by the path to the executable or script you want to start. For example:
- To start Notepad:
Start-Process notepad.exe
- To start a PowerShell script:
Start-Process -FilePath "C:\Scripts\MyScript.ps1"
- You can also use parameters such as
-ArgumentList
to pass arguments to the process being started.
- After executing the
Start-Process
cmdlet with the desired parameters, PowerShell will launch the specified process.
Source for More Information
Here’s a source where you can find more detailed information about Start-Process
and other PowerShell cmdlets:
- Microsoft Docs: Start-Process cmdlet
The Microsoft Docs page provides comprehensive documentation on PowerShell cmdlets, including Start-Process
, with detailed explanations, examples, and usage scenarios.