en-US/BGProcess-help.xml

<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh">
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Read-BGProcess</command:name>
      <command:verb>Read</command:verb>
      <command:noun>BGProcess</command:noun>
      <maml:description>
        <maml:para>Reads the redirected StandardOutput and StandardError streams for a process without blocking.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>When reading from StandardOutput or StandardError, it is easy to accidentally block or deadlock the terminal. For example, if you read from these streams before there is data available to be read, the Read call will be blocked until data is available on that stream or the process is terminated.</maml:para>
      <maml:para>This cmdlet will wait for up to Timeout seconds, or 1 second by default, before returning with whatever data is available.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Read-BGProcess</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none">
          <maml:name>Process</maml:name>
          <maml:description>
            <maml:para>Specifies the BGProcess instance from which to read StandardOutput and StandardError.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">BGProcess</command:parameterValue>
          <dev:type>
            <maml:name>BGProcess</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
          <maml:name>Timeout</maml:name>
          <maml:description>
            <maml:para>Specifies the amount of time to wait before giving up on receiving any (more) data. The default is 1 second, and this parameter is only effective when used with the -Wait switch.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">TimeSpan</command:parameterValue>
          <dev:type>
            <maml:name>TimeSpan</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>MapErrorsToStdOut</maml:name>
          <maml:description>
            <maml:para>Causes any data received from the StandardError stream to be returned as a string along with the StandardOutput data, instead of being raised as an ErrorRecord.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Wait</maml:name>
          <maml:description>
            <maml:para>Specifies that the read operation should be retried up until Timeout seconds before returning whatever data has been received.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>MapErrorsToStdOut</maml:name>
        <maml:description>
          <maml:para>Causes any data received from the StandardError stream to be returned as a string along with the StandardOutput data, instead of being raised as an ErrorRecord.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none">
        <maml:name>Process</maml:name>
        <maml:description>
          <maml:para>Specifies the BGProcess instance from which to read StandardOutput and StandardError.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">BGProcess</command:parameterValue>
        <dev:type>
          <maml:name>BGProcess</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
        <maml:name>Timeout</maml:name>
        <maml:description>
          <maml:para>Specifies the amount of time to wait before giving up on receiving any (more) data. The default is 1 second, and this parameter is only effective when used with the -Wait switch.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">TimeSpan</command:parameterValue>
        <dev:type>
          <maml:name>TimeSpan</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Wait</maml:name>
        <maml:description>
          <maml:para>Specifies that the read operation should be retried up until Timeout seconds before returning whatever data has been received.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>BGProcess</maml:name>
        </dev:type>
        <maml:description>
          <maml:para>This cmdlet accepts a BGProcess object from the pipeline.</maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.String</maml:name>
        </dev:type>
        <maml:description>
          <maml:para>This cmdlet returns zero or more strings, and zero or more ErrorRecords.</maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- Example 1 --------------------------</maml:title>
        <dev:code>$nslookup = Start-BGProcess nslookup
$nslookup | Read-BGProcess -Wait -Timeout ([timespan]::fromseconds(3))
$nslookup | Write-BGProcess "www.powershellgallery.com" -PassThru | Read-BGProcess -Wait -MapErrorsToStdOut -Timeout ([timespan]::fromseconds(3))</dev:code>
        <dev:remarks>
          <maml:para>Queries nslookup for "www.powershellgallery.com". Since the nslookup command writes some lines to StandardError like "Non-authoritative answer:", the errors are returned as strings along with the rest of StandardOutput.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Help</maml:linkText>
        <maml:uri>https://www.joshooaj.com/BGProcess/Functions/Read-BGProcess/</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Start-BGProcess</command:name>
      <command:verb>Start</command:verb>
      <command:noun>BGProcess</command:noun>
      <maml:description>
        <maml:para>Starts a new windowless process with redirected input/output streams.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Starts a new windowless process with redirected input/output streams. This is useful for driving an interactive command-line application from code.</maml:para>
      <maml:para>The Read-BGProcess and Write-BGProcess cmdlets offer a simplified method of responding to interactive command-line prompts such as the netsh or nslookup prompt for instance.</maml:para>
      <maml:para>Note that while almost all functionality in netsh and nslookup can be accessed without entering their interactive prompts, not all command-line tools are as automation-friendly. They are used as examples only out of familiarity and because they are broadly available for testing.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Start-BGProcess</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="Path">
          <maml:name>FileName</maml:name>
          <maml:description>
            <maml:para>Specifies the file name of the application to run.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
          <maml:name>Arguments</maml:name>
          <maml:description>
            <maml:para>Specifies one or more optional command-line arguments.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
          <dev:type>
            <maml:name>String[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="cf">
          <maml:name>Confirm</maml:name>
          <maml:description>
            <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="wi">
          <maml:name>WhatIf</maml:name>
          <maml:description>
            <maml:para>Shows what would happen if the cmdlet runs. The cmdlet is not run.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
        <maml:name>Arguments</maml:name>
        <maml:description>
          <maml:para>Specifies one or more optional command-line arguments.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
        <dev:type>
          <maml:name>String[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="cf">
        <maml:name>Confirm</maml:name>
        <maml:description>
          <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="Path">
        <maml:name>FileName</maml:name>
        <maml:description>
          <maml:para>Specifies the file name of the application to run.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="wi">
        <maml:name>WhatIf</maml:name>
        <maml:description>
          <maml:para>Shows what would happen if the cmdlet runs. The cmdlet is not run.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>None</maml:name>
        </dev:type>
        <maml:description>
          <maml:para>You can't pipe objects to this cmdlet.</maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>BGProcess</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- Example 1 --------------------------</maml:title>
        <dev:code>$nslookup = Start-BGProcess nslookup
$nslookup | Read-BGProcess -Wait -MapErrorsToStdOut
$nslookup | Write-BGProcess "www.powershellgallery.com" -PassThru | Read-BGProcess -Wait -Timeout (New-TimeSpan -Seconds 3) -MapErrorsToStdOut
$nslookup | Write-BGProcess "exit" | Wait-BGProcess
$nslookup | Format-List

&lt;#
Process : System.Diagnostics.Process (nslookup)
Id : 24028
Name : nslookup
ExitCode : 0
HasExited : True
#&gt;</dev:code>
        <dev:remarks>
          <maml:para>Starts an nslookup.exe process without arguments which places you into an interactive nslookup prompt. The initial StandardOutput text is retrieved, and then we write "www.powershellgallery.com" to the StandardInput stream. An Environment.NewLine is appended to the text by default.</maml:para>
          <maml:para>The response is read from StandardOutput with a timeout value of 3 seconds since the response is not expected to be immediate. Finally, we write "exit" to the StandardInput stream and wait for the process to exit before showing the $nslookup object contents.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Help</maml:linkText>
        <maml:uri>https://www.joshooaj.com/BGProcess/Functions/Start-BGProcess/</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Stop-BGProcess</command:name>
      <command:verb>Stop</command:verb>
      <command:noun>BGProcess</command:noun>
      <maml:description>
        <maml:para>Stops one or more running processes.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>The Stop-BGProcess cmdlet stops one or more running processes.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Stop-BGProcess</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none">
          <maml:name>Process</maml:name>
          <maml:description>
            <maml:para>Specifies the BGProcess object to stop.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">BGProcess[]</command:parameterValue>
          <dev:type>
            <maml:name>BGProcess[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="cf">
          <maml:name>Confirm</maml:name>
          <maml:description>
            <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>PassThru</maml:name>
          <maml:description>
            <maml:para>Specifies that the BGProcess object should be returned to the pipeline.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="wi">
          <maml:name>WhatIf</maml:name>
          <maml:description>
            <maml:para>Shows what would happen if the cmdlet runs. The cmdlet is not run.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="cf">
        <maml:name>Confirm</maml:name>
        <maml:description>
          <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>PassThru</maml:name>
        <maml:description>
          <maml:para>Specifies that the BGProcess object should be returned to the pipeline.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none">
        <maml:name>Process</maml:name>
        <maml:description>
          <maml:para>Specifies the BGProcess object to stop.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">BGProcess[]</command:parameterValue>
        <dev:type>
          <maml:name>BGProcess[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="wi">
        <maml:name>WhatIf</maml:name>
        <maml:description>
          <maml:para>Shows what would happen if the cmdlet runs. The cmdlet is not run.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>BGProcess</maml:name>
        </dev:type>
        <maml:description>
          <maml:para>This cmdlet accepts a BGProcess object from the pipeline.</maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>BGProcess</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- Example 1 --------------------------</maml:title>
        <dev:code>$nslookup = Start-BGProcess nslookup
$nslookup | Stop-BGProcess -PassThru | Wait-BGProcess
$nslookup</dev:code>
        <dev:remarks>
          <maml:para>Starts an interactive nslookup prompt, and then abruptly kills the process. Note that the ExitCode and HasExited properties may not be updated until a second or two has passed, but they should be updated automatically. In this case, by using Wait-BGProcess, we know that the process has exited and the ExitCode value should be available.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Help</maml:linkText>
        <maml:uri>https://www.joshooaj.com/BGProcess/Functions/Stop-BGProcess/</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Wait-BGProcess</command:name>
      <command:verb>Wait</command:verb>
      <command:noun>BGProcess</command:noun>
      <maml:description>
        <maml:para>Waits for the processes to be stopped before accepting more input.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>The Wait-BGProcess cmdlet waits for one or more running processes to exit.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Wait-BGProcess</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none">
          <maml:name>Process</maml:name>
          <maml:description>
            <maml:para>Specifies one or more BGProcess instances to wait for the underlying process to exit.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">BGProcess[]</command:parameterValue>
          <dev:type>
            <maml:name>BGProcess[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>PassThru</maml:name>
          <maml:description>
            <maml:para>Specifies that the BGProcess instance(s) should be returned to the pipeline after the underlying process has stopped.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>PassThru</maml:name>
        <maml:description>
          <maml:para>Specifies that the BGProcess instance(s) should be returned to the pipeline after the underlying process has stopped.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none">
        <maml:name>Process</maml:name>
        <maml:description>
          <maml:para>Specifies one or more BGProcess instances to wait for the underlying process to exit.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">BGProcess[]</command:parameterValue>
        <dev:type>
          <maml:name>BGProcess[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>BGProcess</maml:name>
        </dev:type>
        <maml:description>
          <maml:para>This cmdlet accepts a BGProcess object from the pipeline.</maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>BGProcess</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- Example 1 --------------------------</maml:title>
        <dev:code>$ping = Start-BGProcess ping 127.0.0.1 -n 10
$ping | Wait-BGProcess
$results = $ping | Read-BGProcess -Wait</dev:code>
        <dev:remarks>
          <maml:para>Starts a ping to 127.0.0.1, waits until the ping.exe process exits, then reads the results and places the text in $results.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Help</maml:linkText>
        <maml:uri>https://www.joshooaj.com/BGProcess/Functions/Wait-BGProcess/</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Write-BGProcess</command:name>
      <command:verb>Write</command:verb>
      <command:noun>BGProcess</command:noun>
      <maml:description>
        <maml:para>Writes the specified text to the StandardInput stream of the BGProcess.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Write-BGProcess writes the value of "-Text" to the StandardInput stream of the process encapsulated by the provided BGProcess object. The value of `[Environment]::NewLine` is automatically appended to the provided text, but the line terminator can be overridden or excluded with the "-NoLineTerminator" switch.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Write-BGProcess</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none">
          <maml:name>Text</maml:name>
          <maml:description>
            <maml:para>Specifies the text to be written to the StandardInput stream of the process encapsulated by the specified BGProcess instance.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>LineTerminator</maml:name>
          <maml:description>
            <maml:para>Specifies the line ending to add to the value of the "Text" parameter. The default value is the environment-specific value of [Environment]::NewLine.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>[Environment]::NewLine</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>NoLineTerminator</maml:name>
          <maml:description>
            <maml:para>Specifies that a line terminator should not be added automatically.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>PassThru</maml:name>
          <maml:description>
            <maml:para>Specifies that the BGProcess object should be returned to the pipeline after writing to the StandardInput stream.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none">
          <maml:name>Process</maml:name>
          <maml:description>
            <maml:para>Specifies the BGProcess instance to which the value of "Text" should be written to StandardInput.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">BGProcess</command:parameterValue>
          <dev:type>
            <maml:name>BGProcess</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>LineTerminator</maml:name>
        <maml:description>
          <maml:para>Specifies the line ending to add to the value of the "Text" parameter. The default value is the environment-specific value of [Environment]::NewLine.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>[Environment]::NewLine</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>NoLineTerminator</maml:name>
        <maml:description>
          <maml:para>Specifies that a line terminator should not be added automatically.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>PassThru</maml:name>
        <maml:description>
          <maml:para>Specifies that the BGProcess object should be returned to the pipeline after writing to the StandardInput stream.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases="none">
        <maml:name>Process</maml:name>
        <maml:description>
          <maml:para>Specifies the BGProcess instance to which the value of "Text" should be written to StandardInput.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">BGProcess</command:parameterValue>
        <dev:type>
          <maml:name>BGProcess</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none">
        <maml:name>Text</maml:name>
        <maml:description>
          <maml:para>Specifies the text to be written to the StandardInput stream of the process encapsulated by the specified BGProcess instance.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>BGProcess</maml:name>
        </dev:type>
        <maml:description>
          <maml:para>This cmdlet accepts a BGProcess object from the pipeline.</maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>BGProcess</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- Example 1 --------------------------</maml:title>
        <dev:code>$nslookup = Start-BGProcess nslookup
$nslookup | Read-BGProcess -Wait -MapErrorsToStdOut
$nslookup | Write-BGProcess "www.powershellgallery.com" -PassThru | Read-BGProcess -Wait -Timeout (New-TimeSpan -Seconds 3) -MapErrorsToStdOut
$nslookup | Write-BGProcess "exit" | Wait-BGProcess
$nslookup | Format-List

&lt;#
Process : System.Diagnostics.Process (nslookup)
Id : 24028
Name : nslookup
ExitCode : 0
HasExited : True
#&gt;</dev:code>
        <dev:remarks>
          <maml:para>Starts an nslookup.exe process without arguments which places you into an interactive nslookup prompt. The initial StandardOutput text is retrieved, and then we write "www.powershellgallery.com" to the StandardInput stream. An Environment.NewLine is appended to the text by default.</maml:para>
          <maml:para>The response is read from StandardOutput with a timeout value of 3 seconds since the response is not expected to be immediate. Finally, we write "exit" to the StandardInput stream and wait for the process to exit before showing the $nslookup object contents.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Help</maml:linkText>
        <maml:uri>https://www.joshooaj.com/BGProcess/Functions/Write-BGProcess/</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
</helpItems>