Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Assiging user rights to folders - Powershell

$
0
0

Hi

I have only just started working with powershell.  Have got a few good books and been hitting bing(not really, I googled) a lot.  So far I'm pleased with what I have been able to do.  This weekend I set myself a new task:

The task

Read a list of user names from a AD location

Create a folder using each user name

Give the user full access/control to the assoicated folder

Found heaps on info on the web, most of which I did not understand.  But I have made it work, with one little issue.  After I assign the rights and I go look at the folder in explorer, I have to go to the advanced settings in "Secuirty" rights to see the users rights.  I found some info on this, but its gone over my head.  I would really like any help with this.

This is code I'm using to give the user full control over the directory.  I can't help thinking I'm missing something real simple.

New-Object System.Security.AccessControl.FileSystemAccessRule( "$the User","FullControl","Allow")

Any help would be fantastic

Bill Lunam


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>