Read-Host execution order
<p>I'm trying to do the following:</p>

<p>Display a list from a multidimensional array:</p>

<pre><code>    $AssetList | Where-Object {$_.agenttype -eq "N"} | Select-Object number, hostname, agentstatus | Write-Output
</code></pre>

<p>Then read in a number from the user:</p>

<pre><code>    $Victim = Read-Host -Prompt 'Enter the number of the host you want rid of...' 
</code></pre>

<p>What happens in reality is the Read-Host is displayed before the Write-Output. How can I flip it and reverse it?</p>