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
12 changes: 12 additions & 0 deletions reference/4.0/Microsoft.PowerShell.Core/Start-Job.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,17 @@ This command starts a job that collects a large amount of data and saves it in a
The command uses the InitializationScript parameter to run a script block that imports a required module.
It also uses the RunAs32 parameter to run the job in a 32-bit process even if the computer has a 64-bit operating system.

### Example 7: Pass input to a background job

```
PS C:\> Start-Job -ScriptBlock {Write-Output $Input} -InputObject 'Hello, world!'
```

This command starts a job that simply accesses and outputs its input.
The command uses the *InputObject* parameter to pass input to the job.
Input to a job is accessed via the $Input automatic variable.
The $_ automatic variable (alias $PSItem) is not populated.

## PARAMETERS

### -ArgumentList
Expand Down Expand Up @@ -409,6 +420,7 @@ Accept wildcard characters: False
### -ScriptBlock
Specifies the commands to run in the background job.
Enclose the commands in braces ( { } ) to create a script block.
Use the $Input automatic variable to access the value of the *InputObject* parameter.
This parameter is required.

```yaml
Expand Down
12 changes: 12 additions & 0 deletions reference/5.0/Microsoft.PowerShell.Core/Start-Job.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,17 @@ This command starts a job that collects lots of data, and then saves it in a .ti
The command uses the *InitializationScript* parameter to run a script block that imports a required module.
It also uses the *RunAs32* parameter to run the job in a 32-bit process even if the computer has a 64-bit operating system.

### Example 7: Pass input to a background job

```
PS C:\> Start-Job -ScriptBlock {Write-Output $Input} -InputObject 'Hello, world!'
```

This command starts a job that simply accesses and outputs its input.
The command uses the *InputObject* parameter to pass input to the job.
Input to a job is accessed via the $Input automatic variable.
The $_ automatic variable (alias $PSItem) is not populated.

## PARAMETERS

### -ArgumentList
Expand Down Expand Up @@ -438,6 +449,7 @@ Accept wildcard characters: False
### -ScriptBlock
Specifies the commands to run in the background job.
Enclose the commands in braces ( { } ) to create a script block.
Use the $Input automatic variable to access the value of the *InputObject* parameter.
This parameter is required.

```yaml
Expand Down
12 changes: 12 additions & 0 deletions reference/5.1/Microsoft.PowerShell.Core/Start-Job.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,17 @@ This command starts a job that collects lots of data, and then saves it in a .ti
The command uses the *InitializationScript* parameter to run a script block that imports a required module.
It also uses the *RunAs32* parameter to run the job in a 32-bit process even if the computer has a 64-bit operating system.

### Example 7: Pass input to a background job

```
PS C:\> Start-Job -ScriptBlock {Write-Output $Input} -InputObject 'Hello, world!'
```

This command starts a job that simply accesses and outputs its input.
The command uses the *InputObject* parameter to pass input to the job.
Input to a job is accessed via the $Input automatic variable.
The $_ automatic variable (alias $PSItem) is not populated.

## PARAMETERS

### -ArgumentList
Expand Down Expand Up @@ -419,6 +430,7 @@ Accept wildcard characters: False
### -ScriptBlock
Specifies the commands to run in the background job.
Enclose the commands in braces ( { } ) to create a script block.
Use the $Input automatic variable to access the value of the *InputObject* parameter.
This parameter is required.

```yaml
Expand Down
12 changes: 12 additions & 0 deletions reference/6/Microsoft.PowerShell.Core/Start-Job.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,17 @@ This command starts a job that collects lots of data, and then saves it in a .ti
The command uses the *InitializationScript* parameter to run a script block that imports a required module.
It also uses the *RunAs32* parameter to run the job in a 32-bit process even if the computer has a 64-bit operating system.

### Example 7: Pass input to a background job

```
PS C:\> Start-Job -ScriptBlock {Write-Output $Input} -InputObject 'Hello, world!'
```

This command starts a job that simply accesses and outputs its input.
The command uses the *InputObject* parameter to pass input to the job.
Input to a job is accessed via the $Input automatic variable.
The $_ automatic variable (alias $PSItem) is not populated.

## PARAMETERS

### -ArgumentList
Expand Down Expand Up @@ -455,6 +466,7 @@ Accept wildcard characters: False

Specifies the commands to run in the background job.
Enclose the commands in braces ( { } ) to create a script block.
Use the $Input automatic variable to access the value of the *InputObject* parameter.
This parameter is required.

```yaml
Expand Down