Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
keywords: powershell,cmdlet
Locale: en-US
Module Name: Microsoft.PowerShell.Management
ms.date: 06/18/2020
ms.date: 07/20/2020
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.management/start-process?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Start-Process
Expand Down Expand Up @@ -303,7 +303,7 @@ Accept wildcard characters: False
### -UseNewEnvironment

Indicates that this cmdlet uses new environment variables specified for the process. By default, the
started process runs with the environment variables specified for the computer and user.
started process runs with the environment variables inherited from the parent process.

```yaml
Type: System.Management.Automation.SwitchParameter
Expand Down Expand Up @@ -428,7 +428,7 @@ parameter. Otherwise, this cmdlet does not return any output.

- This cmdlet is implemented by using the **Start** method of the **System.Diagnostics.Process**
class. For more information about this method, see
[Process.Start Method](/dotnet/api/system.diagnostics.process.start?view=netframework-4.7.2#overloads).
[Process.Start Method](/dotnet/api/system.diagnostics.process.start#overloads).

- On Windows, when you use **UseNewEnvironment**, the new process starts only containing the default
environment variables defined for the **Machine** scope. This has the side affect that the
Expand Down
28 changes: 18 additions & 10 deletions reference/6/Microsoft.PowerShell.Management/Start-Process.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
keywords: powershell,cmdlet
Locale: en-US
Module Name: Microsoft.PowerShell.Management
ms.date: 06/18/2020
ms.date: 07/20/2020
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.management/start-process?view=powershell-6&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Start-Process
Expand Down Expand Up @@ -198,7 +198,7 @@ Accept wildcard characters: False
### -LoadUserProfile

Indicates that this cmdlet loads the Windows user profile stored in the `HKEY_USERS` registry key
for the current user.
for the current user. The parameter does not apply for non-Windows systems.

This parameter does not affect the PowerShell profiles. For more information, see
[about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md).
Expand All @@ -217,10 +217,13 @@ Accept wildcard characters: False

### -NoNewWindow

Start the new process in the current console window. By default PowerShell opens a new window.
Start the new process in the current console window. By default on Windows, PowerShell opens a new
window. On non-Windows systems, you never get a new terminal window.

You cannot use the **NoNewWindow** and **WindowStyle** parameters in the same command.

The parameter does not apply for non-Windows systems.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: Default
Expand Down Expand Up @@ -304,7 +307,7 @@ Accept wildcard characters: False
### -UseNewEnvironment

Indicates that this cmdlet uses new environment variables specified for the process. By default, the
started process runs with the environment variables specified for the computer and user.
started process runs with the environment variables inherited from the parent process.

```yaml
Type: System.Management.Automation.SwitchParameter
Expand Down Expand Up @@ -336,6 +339,8 @@ To find the verbs that can be used with the file that runs in a process, use the
to create a **System.Diagnostics.ProcessStartInfo** object for the file. The available verbs are in
the **Verbs** property of the **ProcessStartInfo** object. For details, see the examples.

The parameter does not apply for non-Windows systems.

```yaml
Type: System.String
Parameter Sets: UseShellExecute
Expand Down Expand Up @@ -374,6 +379,8 @@ parameter are: **Normal**, **Hidden**, **Minimized**, and **Maximized**. The def

You cannot use the **WindowStyle** and **NoNewWindow** parameters in the same command.

The parameter does not apply for non-Windows systems.

```yaml
Type: System.Diagnostics.ProcessWindowStyle
Parameter Sets: (All)
Expand Down Expand Up @@ -463,17 +470,18 @@ parameter. Otherwise, this cmdlet does not return any output.

- This cmdlet is implemented by using the **Start** method of the **System.Diagnostics.Process**
class. For more information about this method, see
[Process.Start Method](/dotnet/api/system.diagnostics.process.start?view=netframework-4.7.2#overloads).

- When using PowerShell Core on Linux, to open a new process within a new window (similar to the
default behavior when using `Start-Process` in Windows), run the cmdlet with the
**UseNewEnvironment** and **Wait** parameters. This prevents the new process from blocking
PowerShell's control of keyboard input.
[Process.Start Method](/dotnet/api/system.diagnostics.process.start#overloads).

- On Windows, when you use **UseNewEnvironment**, the new process starts only containing the default
environment variables defined for the **Machine** scope. This has the side affect that the
`$env:USERNAME` is set to **SYSTEM**. None of the variables from the **User** scope are included.

- On Windows, the most common use case for `Start-Process` is to use the **Wait** parameter to block
progress until the new process exits. On non-Windows system, this is rarely needed since the
default behavior for command-line applications is equivalent to `Start-Process -Wait`.

- When using `Start-Process` on non-Windows systems, you never get a new terminal window.

## RELATED LINKS

[Debug-Process](Debug-Process.md)
Expand Down
33 changes: 21 additions & 12 deletions reference/7.0/Microsoft.PowerShell.Management/Start-Process.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
keywords: powershell,cmdlet
Locale: en-US
Module Name: Microsoft.PowerShell.Management
ms.date: 06/18/2020
ms.date: 07/20/2020
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.management/start-process?view=powershell-7&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Start-Process
Expand Down Expand Up @@ -198,7 +198,7 @@ Accept wildcard characters: False
### -LoadUserProfile

Indicates that this cmdlet loads the Windows user profile stored in the `HKEY_USERS` registry key
for the current user.
for the current user. The parameter does not apply for non-Windows systems.

This parameter does not affect the PowerShell profiles. For more information, see
[about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md).
Expand All @@ -217,10 +217,13 @@ Accept wildcard characters: False

### -NoNewWindow

Start the new process in the current console window. By default PowerShell opens a new window.
Start the new process in the current console window. By default on Windows, PowerShell opens a new
window. On non-Windows systems, you never get a new terminal window.

You cannot use the **NoNewWindow** and **WindowStyle** parameters in the same command.

The parameter does not apply for non-Windows systems.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: Default
Expand Down Expand Up @@ -304,7 +307,7 @@ Accept wildcard characters: False
### -UseNewEnvironment

Indicates that this cmdlet uses new environment variables specified for the process. By default, the
started process runs with the environment variables specified for the computer and user.
started process runs with the environment variables inherited from the parent process.

```yaml
Type: System.Management.Automation.SwitchParameter
Expand Down Expand Up @@ -336,6 +339,8 @@ To find the verbs that can be used with the file that runs in a process, use the
to create a **System.Diagnostics.ProcessStartInfo** object for the file. The available verbs are in
the **Verbs** property of the **ProcessStartInfo** object. For details, see the examples.

The parameter does not apply for non-Windows systems.

```yaml
Type: System.String
Parameter Sets: UseShellExecute
Expand Down Expand Up @@ -374,6 +379,8 @@ parameter are: **Normal**, **Hidden**, **Minimized**, and **Maximized**. The def

You cannot use the **WindowStyle** and **NoNewWindow** parameters in the same command.

The parameter does not apply for non-Windows systems.

```yaml
Type: System.Diagnostics.ProcessWindowStyle
Parameter Sets: (All)
Expand All @@ -390,8 +397,9 @@ Accept wildcard characters: False
### -WorkingDirectory

Specifies the location that the new process should start in. The default is the location of the
executable file or document being started. Wildcards are not supported. The path name must not
contain characters that would be interpreted as wildcards.
executable file or document being started. The path provided is treated as a literal path. Wildcards
are not supported. You must enclose the path in single quotes (`'`) if the path name contains
characters that would be interpreted as wildcards.

```yaml
Type: System.String
Expand Down Expand Up @@ -463,17 +471,18 @@ parameter. Otherwise, this cmdlet does not return any output.

- This cmdlet is implemented by using the **Start** method of the **System.Diagnostics.Process**
class. For more information about this method, see
[Process.Start Method](/dotnet/api/system.diagnostics.process.start?view=netframework-4.7.2#overloads).

- When using PowerShell Core on Linux, to open a new process within a new window (similar to the
default behavior when using `Start-Process` in Windows), run the cmdlet with the
**UseNewEnvironment** and **Wait** parameters. This prevents the new process from blocking
PowerShell's control of keyboard input.
[Process.Start Method](/dotnet/api/system.diagnostics.process.start#overloads).

- On Windows, when you use **UseNewEnvironment**, the new process starts only containing the default
environment variables defined for the **Machine** scope. This has the side affect that the
`$env:USERNAME` is set to **SYSTEM**. None of the variables from the **User** scope are included.

- On Windows, the most common use case for `Start-Process` is to use the **Wait** parameter to block
progress until the new process exits. On non-Windows system, this is rarely needed since the
default behavior for command-line applications is equivalent to `Start-Process -Wait`.

- When using `Start-Process` on non-Windows systems, you never get a new terminal window.

## RELATED LINKS

[Debug-Process](Debug-Process.md)
Expand Down
33 changes: 20 additions & 13 deletions reference/7.1/Microsoft.PowerShell.Management/Start-Process.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
keywords: powershell,cmdlet
Locale: en-US
Module Name: Microsoft.PowerShell.Management
ms.date: 06/18/2020
ms.date: 07/20/2020
online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.management/start-process?view=powershell-7.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Start-Process
Expand Down Expand Up @@ -198,7 +198,7 @@ Accept wildcard characters: False
### -LoadUserProfile

Indicates that this cmdlet loads the Windows user profile stored in the `HKEY_USERS` registry key
for the current user.
for the current user. The parameter does not apply for non-Windows systems.

This parameter does not affect the PowerShell profiles. For more information, see
[about_Profiles](../Microsoft.PowerShell.Core/About/about_Profiles.md).
Expand All @@ -217,10 +217,13 @@ Accept wildcard characters: False

### -NoNewWindow

Start the new process in the current console window. By default PowerShell opens a new window.
Start the new process in the current console window. By default on Windows, PowerShell opens a new
window. On non-Windows systems, you never get a new terminal window.

You cannot use the **NoNewWindow** and **WindowStyle** parameters in the same command.

The parameter does not apply for non-Windows systems.

```yaml
Type: System.Management.Automation.SwitchParameter
Parameter Sets: Default
Expand Down Expand Up @@ -304,7 +307,7 @@ Accept wildcard characters: False
### -UseNewEnvironment

Indicates that this cmdlet uses new environment variables specified for the process. By default, the
started process runs with the environment variables specified for the computer and user.
started process runs with the environment variables inherited from the parent process.

```yaml
Type: System.Management.Automation.SwitchParameter
Expand Down Expand Up @@ -336,6 +339,8 @@ To find the verbs that can be used with the file that runs in a process, use the
to create a **System.Diagnostics.ProcessStartInfo** object for the file. The available verbs are in
the **Verbs** property of the **ProcessStartInfo** object. For details, see the examples.

The parameter does not apply for non-Windows systems.

```yaml
Type: System.String
Parameter Sets: UseShellExecute
Expand Down Expand Up @@ -374,6 +379,8 @@ parameter are: **Normal**, **Hidden**, **Minimized**, and **Maximized**. The def

You cannot use the **WindowStyle** and **NoNewWindow** parameters in the same command.

The parameter does not apply for non-Windows systems.

```yaml
Type: System.Diagnostics.ProcessWindowStyle
Parameter Sets: (All)
Expand Down Expand Up @@ -464,16 +471,17 @@ parameter. Otherwise, this cmdlet does not return any output.

- This cmdlet is implemented by using the **Start** method of the **System.Diagnostics.Process**
class. For more information about this method, see
[Process.Start Method](/dotnet/api/system.diagnostics.process.start?view=netframework-4.7.2#overloads).

- When using PowerShell Core on Linux, to open a new process within a new window (similar to the
default behavior when using `Start-Process` in Windows), run the cmdlet with the
**UseNewEnvironment** and **Wait** parameters. This prevents the new process from blocking
PowerShell's control of keyboard input.
[Process.Start Method](/dotnet/api/system.diagnostics.process.start#overloads).

- On Windows, when you use **UseNewEnvironment**, the new process starts only containing the default
environment variables defined for the **Machine** and **User** scopes. This change was made in
PowerShell 7.1.
environment variables defined for the **Machine** scope. This has the side affect that the
`$env:USERNAME` is set to **SYSTEM**. None of the variables from the **User** scope are included.

- On Windows, the most common use case for `Start-Process` is to use the **Wait** parameter to block
progress until the new process exits. On non-Windows system, this is rarely needed since the
default behavior for command-line applications is equivalent to `Start-Process -Wait`.

- When using `Start-Process` on non-Windows systems, you never get a new terminal window.

## RELATED LINKS

Expand All @@ -486,4 +494,3 @@ parameter. Otherwise, this cmdlet does not return any output.
[Stop-Process](Stop-Process.md)

[Wait-Process](Wait-Process.md)