Solved

Powershell to create shared folders for users with permssions

Posted on 2015-01-22
3
181 Views
Last Modified: 2015-01-27
Hello!!

I've recently put up a post asking, how I could use PowerShell to create multiple user share folders and amend permissions so that they (the user) have Modify rights only and system/admin have full rights only.
I was provided the following link, https://gallery.technet.microsoft.com/scriptcenter/How-to-create-home-folder-d968f1d4   which did sort of help but as a n00b (forgive me) I need a bit of hand holding as I'm new and learning PowerShell. I have a couple of questions..

1.      How can I use the script so that the user has Modify rights and system/Adam have full rights.
2.      How can the List.txt file i have importing the user name, create the folders in a username structure as oppose to the users full name? i.e. Bob Smith > Bbs

Is anyone able to help and simplify an answer? Also, I have a test environment, so I’m not a live canon :D

Thanks!!!
0
Comment
Question by:N00b2015
  • 2
3 Comments
 
LVL 80

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 40565702
CreateHomeFolder.ps1.txt

To satisfy your requirements changed user from 'full control' to 'modify'
If there are spaces in the users name enclose them with quotes
you should be using the samaccountname
0
 

Author Comment

by:N00b2015
ID: 40566173
David, thank you!!

Everything is working as it should now. Although, the system and admin permissions are now only modify also, which should be full permissions. The user is fine as modify. Any ideas?
0
 

Author Closing Comment

by:N00b2015
ID: 40572485
Demonstrated where the fix needed to be applied including script.
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question