+ Post New Thread
Results 1 to 2 of 2
Scripts Thread, Script to create shares and apply permissions to shares? in Coding and Web Development; We have a server that has a Direct Attached Storage box plugged into it. All great except when the box ...
  1. #1
    reggiep's Avatar
    Join Date
    Apr 2008
    Location
    In the vast area of space and time
    Posts
    1,550
    Thank Post
    518
    Thanked 56 Times in 50 Posts
    Rep Power
    30

    Script to create shares and apply permissions to shares?

    We have a server that has a Direct Attached Storage box plugged into it.
    All great except when the box is rebooted.
    All the shares are dropped from it!
    I would like to create a script that when run would recreate the share and give the correct permissions to the users.
    For example I need to reshare the folder r:\resources as resources to everyone but also create a deny to the exams group.

    I assume it would need to be something like...

    Code:
    net share Resources "R:\Resources" /add
    net share Resources /grant:"everyone",full
    but that's my limit at the moment!

    Any help please?
    Last edited by reggiep; 15th November 2012 at 11:02 AM.

  2. #2
    reggiep's Avatar
    Join Date
    Apr 2008
    Location
    In the vast area of space and time
    Posts
    1,550
    Thank Post
    518
    Thanked 56 Times in 50 Posts
    Rep Power
    30
    Sorry, I knew I was being a bit slow.
    Sorted it out now.

    Code:
    net share resources="r:\resources /GRANT:everyone,FULL
    but not sure about the deny yet!

SHARE:
+ Post New Thread

Similar Threads

  1. script to rename computer and join it to domain ...
    By RabbieBurns in forum Scripts
    Replies: 22
    Last Post: 2nd May 2013, 11:08 AM
  2. Output of share and security permissions to a file
    By bodminman in forum Windows Server 2000/2003
    Replies: 0
    Last Post: 10th September 2012, 02:15 PM
  3. Replies: 28
    Last Post: 30th May 2012, 05:45 PM
  4. Script Help - Query AD and add it to a reg key
    By Stuart_C in forum Scripts
    Replies: 6
    Last Post: 14th May 2010, 06:04 PM
  5. Replies: 4
    Last Post: 6th August 2009, 10:25 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •