diff --git a/reference/3.0/Microsoft.PowerShell.Core/Enter-PSSession.md b/reference/3.0/Microsoft.PowerShell.Core/Enter-PSSession.md index 719e6a27b9f8..98857a585d77 100644 --- a/reference/3.0/Microsoft.PowerShell.Core/Enter-PSSession.md +++ b/reference/3.0/Microsoft.PowerShell.Core/Enter-PSSession.md @@ -84,25 +84,27 @@ The commands that you enter run in the new session, and the results are returned ### Example 2 ``` -The first command uses the Enter-PSSession cmdlet to start an interactive session with Server01, a remote computer. When the session starts, the command prompt changes to include the computer name. PS> Enter-PSSession -Computer Server01 [Server01]: PS> - -The second command gets the PowerShell process and redirects the output to the Process.txt file. The command is submitted to the remote computer, and the file is saved on the remote computer. [Server01]: PS> Get-Process Powershell > C:\ps-test\Process.txt - -The third command uses the Exit keyword to end the interactive session and close the connection. [Server01]: PS> exit PS> - -The fourth command confirms that the Process.txt file is on the remote computer. A Get-ChildItem ("dir") command on the local computer cannot find the file. PS> dir C:\ps-test\process.txt +``` + +```output Get-ChildItem : Cannot find path 'C:\ps-test\process.txt' because it does not exist. At line:1 char:4 + dir <<<< c:\ps-test\process.txt ``` -This command shows how to work in an interactive session with a remote computer. +The first command uses the Enter-PSSession cmdlet to start an interactive session with Server01, a remote computer. When the session starts, the command prompt changes to include the computer name. + +The second command gets the PowerShell process and redirects the output to the Process.txt file. The command is submitted to the remote computer, and the file is saved on the remote computer. + +The third command uses the Exit keyword to end the interactive session and close the connection. + +The fourth command confirms that the Process.txt file is on the remote computer. A Get-ChildItem ("dir") command on the local computer cannot find the file. ### Example 3 diff --git a/reference/3.0/PSWorkflow/About/about_Checkpoint-Workflow.md b/reference/3.0/PSWorkflow/About/about_Checkpoint-Workflow.md index ef3c59f27f68..4b536b5d668e 100644 --- a/reference/3.0/PSWorkflow/About/about_Checkpoint-Workflow.md +++ b/reference/3.0/PSWorkflow/About/about_Checkpoint-Workflow.md @@ -1,20 +1,22 @@ ---- +--- ms.date: 06/09/2017 schema: 2.0.0 locale: en-us keywords: powershell,cmdlet title: about_Checkpoint Workflow --- - # About Checkpoint-Workflow + ## about_Checkpoint-Workflow ## SHORT DESCRIPTION + Describes the Checkpoint-Workflow activity, which takes a checkpoint in a workflow. ## LONG DESCRIPTION + The Checkpoint-Workflow activity takes a checkpoint, which saves state and data in the workflow. If the workflow is suspended or interrupted, it can be resumed from the most recent checkpoint, rather than having to be restarted. The Checkpoint-Workflow activity is valid only in a workflow. @@ -41,6 +43,7 @@ Consider taking checkpoints after critical steps so the workflow can be resumed ### ABOUT CHECKPOINTS + A checkpoint is a snapshot of the current state of the workflow, including the current values of variables, and any output generated up to that point, and it saves it to disk. If a workflow is interrupted, intentionally or unintentionally, Windows PowerShell® Workflow automatically uses the data in newest checkpoint to recover and resume the workflow. @@ -49,6 +52,7 @@ When you run the workflow as a job, such as by using the AsJob workflow common p ### OTHER CHECKPOINTING TECHNIQUES + In addition to the Checkpoint-Workflow activity, Windows PowerShell Workflow supports other checkpointing techniques, including the following: -- PSPersist workflow common parameter @@ -61,10 +65,11 @@ For more information about adding a checkpoint to a workflow, see "How to Add Ch ## EXAMPLES + The following workflow includes a call to the Checkpoint-Workflow activity after completing a long-running function and a script that share data. -``` +```powershell Workflow Test-Workflow { $a = Invoke-LongRunningFunction @@ -81,4 +86,5 @@ Workflow Test-Workflow ## SEE ALSO + How to Add Checkpoints to a Workflow (http:\/\/go.microsoft.com\/fwlink\/?LinkId\=261993) \ No newline at end of file diff --git a/reference/3.0/PSWorkflow/About/about_Foreach-Parallel.md b/reference/3.0/PSWorkflow/About/about_Foreach-Parallel.md index 2eaad4573537..998f4e1a3928 100644 --- a/reference/3.0/PSWorkflow/About/about_Foreach-Parallel.md +++ b/reference/3.0/PSWorkflow/About/about_Foreach-Parallel.md @@ -1,20 +1,22 @@ ---- +--- ms.date: 06/09/2017 schema: 2.0.0 locale: en-us keywords: powershell,cmdlet title: about_Foreach Parallel --- - # About Foreach-Parallel + ## about_Foreach-Parallel ## SHORT DESCRIPTION + Describes the ForEach -Parallel language construct in Windows PowerShell® Workflow ## LONG DESCRIPTION + The Parallel parameter of the ForEach keyword runs the commands in a ForEach script block once for each item in a specified collection. The items in the collection, such as a disk in a collection of disks, are processed in parallel. The commands in the script block run sequentially on each item in the collection. @@ -37,6 +39,7 @@ ForEach -Parallel ($ in $) ### DETAILED DESCRIPTION + Like the ForEach statement in Windows PowerShell, the variable that contains collection ($) must be defined before the ForEach -Parallel statement, but the variable that represents the current item ($) is defined in the ForEach -Parallel statement. The ForEach -Parallel construct is different from the ForEach keyword and the Parallel keyword. The ForEach keyword processes the items in the collection in sequence. The Parallel keyword runs commands in a script block in parallel. You can enclose a Parallel script block in a ForEach -Parallel script block. @@ -45,6 +48,7 @@ The target computers in a workflow, such as those specified by the PSComputerNam ### EXAMPLES + The following workflow contains a ForEach -Parallel statement that processes the disks that the Get-Disk activity gets. The commands in the ForEach -Parallel script block run sequentially, but they run on the disks in parallel. The disks might be processed concurrently and in any order. @@ -90,6 +94,7 @@ workflow Test-Workflow ## SEE ALSO + Writing a Script Workflow (http://go.microsoft.com/fwlink/?LinkId=262872) about_ForEach diff --git a/reference/3.0/PSWorkflow/About/about_InlineScript.md b/reference/3.0/PSWorkflow/About/about_InlineScript.md index d74240b8d22d..dd97c59c88f1 100644 --- a/reference/3.0/PSWorkflow/About/about_InlineScript.md +++ b/reference/3.0/PSWorkflow/About/about_InlineScript.md @@ -1,31 +1,30 @@ ---- +--- ms.date: 06/09/2017 schema: 2.0.0 locale: en-us keywords: powershell,cmdlet title: about_InlineScript --- - # About InlineScript -## about_InlineScript - -# SHORT DESCRIPTION +## SHORT DESCRIPTION Describes the InlineScript activity, which runs Windows PowerShell commands in a workflow. -# LONG DESCRIPTION +## LONG DESCRIPTION The InlineScript activity runs commands in a shared Windows PowerShell session in a workflow. This activity is valid only in workflows. -# SYNTAX +## SYNTAX -InlineScript {\