title: Execute PowerShell command from VBScript
body: <p>I have a PowerShell command which removes virtual Folder from the IIS (8.5)</p>
  
  <pre class="lang-bsh prettyprint-override"><code>Remove-Item IIS:\Sites\WebsiteName\VirtualFolderName -Force -Recurse
  </code></pre>
  
  <p>This works just fine when executed standalone from PowerShell console, but I want to run this from inside of a VBScript. I have VBScript something like this:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Set objShell = CreateObject("WScript.Shell")
  objShell.Run("powershell.exe -noexit -Command='Remove-Item IIS:\Sites\WebsiteName\VirtualFolderName -Force -Recurse'")
  </code></pre>
  
  <p>When I execute above it wont work, and it just spits out the command on the PowerShell console.</p>
  
  <p>Any suggestions here?</p>