title: Chef - Returning a variable from powershell script
body: <p>I would like to know if there is a way to return a variable value from a powershell script defined in <code>powershell_script</code> resource?</p>
  
  <p>My <code>powershell</code> resource looks like following:</p>
  
  <pre><code>powershell_script "Test Script" do
    code &lt;&lt;-EOH
      Write-Host "Hello World!"
     return "test"
    EOH
  end
  </code></pre>
  
  <p>I would like to use the returned value <code>test</code> from the script to use in other resources based on if conditions.</p>
  
  <p>Thanks</p>