Solved

Powershell to create shared folders for users with permssions

Posted on 2015-01-22
3
169 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 78

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Set OWA language and time zone in Exchange for individuals, all users or per database.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

707 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

14 Experts available now in Live!

Get 1:1 Help Now