Solved

Powershell to create shared folders for users with permssions

Posted on 2015-01-22
3
175 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 79

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] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

Question has a verified solution.

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

"Migrate" an SMTP relay receive connector to a new server using info from an old server.
This article will help you understand what HashTables are and how to use them in PowerShell.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now