title: How to get output stream for Invoke-AzureRmVMRunCommand command?
body: <p>I am trying to run the below command</p>
  
  <pre><code>Invoke-AzVMRunCommand -ResourceGroupName $instance.ResourceGroupName -Name $instance.Name -CommandId 'RunPowerShellScript' -ScriptPath 'C:\Users\tushar.raichand\Desktop\sample.ps1'
  </code></pre>
  
  <p>Sample.ps1 is as below</p>
  
  <pre><code>$output = Get-LocalUser
  Write-Output $output
  $output
  </code></pre>
  
  <p>The output i am getting for Invoke-AzVMRunCommand is </p>
  
  <pre><code>Microsoft.Azure.Commands.Compute.Automation.Models.PSRunCommandResult
  </code></pre>