I need a script that create folders and shares them RRS feed

  • Question

  • We need a power shell script that has this parameters:

    -          Servername
    -          Filepath (to create)
    -          ShareName

    The script will than create the folder on the given server and create the share.


    A second script should do this


    -          Servername
    -          ShareName
    -          Account
    -          Permission

    The script will than give on the given server and given share the mentioned account/group the permissions.

    any one can help?

    Tuesday, December 10, 2013 10:22 AM

All replies

  • I am using below code. you can try this using command line.

    @echo off
    CD /D E:
    net share TEMP /delete /Y
    ren "Temp" "TEMPOLD" 
    MD Temp
    net share Temp=E:\Temp /GRANT:Everyone,FULL

    Akshay Pate

    Tuesday, December 10, 2013 10:43 AM