2-8: Script the Creation of an SMB Share

Solution overview

Type of solution


Features and tools

VBScript, PSExec, net share

Solution summary

Customize and use the Share_Create.vbs script to script the creation of an SMB share, including all of its properties.


Increased manageability of shared folder security


Because the Shared Folder user interfaces apply default share permissions and caching settings that are not desirable in most situations, I recommend creating a script that can be used to deploy shared folders based on your specifications.

Using Share_Create.vbs

The Share_Create.vbs script, in the Scripts folder of the companion media, creates a share and assigns the Everyone::Allow::Full Control permission. The usage of the ...

Get Windows® Administration Resource Kit: Productivity Solutions for IT Professionals now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.