title: Howto create an IIS Virtual Directory using a network share with WMI
body: <p>I need to create a virtual directory within an IIS Site pointing at a network share <strong>\\servername\sharename\directory</strong> and I need to specify a specific user for the Pass-through authentication.</p>
  
  <p>I am after the WMI script to do this which I intend to call from a Powershell script.</p>
  
  <p>Although the target IIS environment is IIS7 (WMI namespace root/WebAdministration) I would prefer to use WMI classes that are IIS6 compatible (root\MicrosoftIISv2) as the rest of the script already works against IIS6.</p>
  
  <p>I know I can probably do this with the IIS7 powershell cmdlets or appcmd  but I am trying to maintain the IIS6 compatibility.</p>