Jump to content

Script to create shares and apply permissions to shares?


Recommended Posts

Posted (edited)

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...

 

net share Resources "R:\Resources" /add
net share Resources /grant:"everyone",full

 

but that's my limit at the moment!

 

Any help please?

Edited by reggiep
Posted

Sorry, I knew I was being a bit slow.

Sorted it out now.

 

net share resources="r:\resources /GRANT:everyone,FULL 

 

but not sure about the deny yet!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...