title: How do I assign full access to a Windows Share using PowerShell 2
body: <p>I have a simple PowerShell command that can share a folder:</p>
  
  <pre><code>$(Get-WMIObject Win32_Share -List).Create("C:\MyPath\WebData", "WebData", 0)
  </code></pre>
  
  <p>But that creates it with "Everyone" having read-only access.</p>
  
  <p>How do I create it with everyone having full access? Or any other access, for that matter.</p>
  
  <p>I can't work out how to use the <code>Win32_SecurityDescriptor</code> parameter on the WMI Share Create method.</p>
  
  <p>The examples I have found so far only affect the file permissions (Get-ACL, Set-ACL, etc), which is <em>not</em> the problem I have, or they use command-line commands or vba,  which I also want to avoid. This must be possible in PS.</p>
  
  <p>I cannot use PowerShell 3 here, so the new New-SMBShare and related methods are not available.</p>
  
  <p>thanks,</p>