title: Powershell New-WebApplication
body: <pre><code>[Void][Reflection.Assembly]::LoadWithPartialName("Microsoft.Web.Administration")
  
  New-WebApplication -Name 'testApp' -Site 'Default Web Site' -PhysicalPath c:\test -ApplicationPool DefaultAppPool 
  </code></pre>
  
  <p>That is the contents of test.ps1.
  When I run .\test.ps1 I get the following error.</p>
  
  <blockquote>
    <p>New-WebApplication : Cannot retrieve the dynamic parameters for the
    cmdlet. Retrieving the COM class factory for compon ent with CLSID
    {688EEEE5-6A7E-422F-B2E1-6AF00DC944A6} failed due to the following
    error: 80040154. At C:\code\work\users\mchevett\test.ps1:6 char:19
    + New-WebApplication &lt;&lt;&lt;&lt;  -Name 'testApp' -Site 'Default Web Site'
    -PhysicalPath c:\test -ApplicationPool DefaultAppPo ol
        + CategoryInfo          : InvalidArgument: (:)
    [New-WebApplication], ParameterBindingException
        + FullyQualifiedErrorId :
    GetDynamicParametersException,Microsoft.IIs.PowerShell.Provider.NewWebApplicationCommand</p>
  </blockquote>
  
  <p>This error message is not helping me at all.  Any ideas how to get a better error message?  Thanks for reading!</p>