I need a script to run on Vista Ultimate to share an external drive and assign full control to Everyone. I\'ve got a batch file to create the share using net share
,
The Carbon PowerShell module has two functions that will do this for you: Install-SmbShare and Grant-Permission. I would download it and give it a try.
Install-SmbShare -Name MyShare -Path X:\ -FullAccess 'Everybody' `
-Description 'My super-awesome file share!'
Grant-Permission -Identity Everyone -Permission FullControl -Path X:\
Disclaimer: I am the author and creator of Carbon. I recommend using this module because there are a lot of caveats and potholes to look out for when installing shares and granting permissions. These two function take care of that for you.