Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Set permissions on standardly named locations

$
0
0

I am not sure how to do what I want to do so I am asking here. 

I have 2 labs of computers.  

lab1-01,lab1-02,lab1-03

lab2-01,lab2-02,lab2-03

I have similarly named user accounts that can only log into the proper computer at the proper time.

lab1stu01day (can only log into lab-01 during day) 

lab1stu02day (can only log into lab-02 during day)

lab1stu01night (can only log into lab-01 at night)

lab2stu02day (can only log into lab2-02 during day)

lab2stu02night (can only log into lab2-02 at night)

There is a D:\courseware\day and a D:\coursware\night folder.

I want to lock down permissions on the Day and Night folders to the day and night students. so that the night students cant get into the day folder and the day students cant get into the night folder.

seems like the only real variables are the lab number and the student number.  I should be able to create the user name from the computer name somehow with a count from left 3 to get the 4th item of the lab number (1 or 2). and the student number based on count right 2 to get the student number from the computer name 01, 02 etc)

I am just really confused :) mostly I do not know how to assign permissions to folders with powershell.

I might be able to make this easier by creating user groups and simply blocking access to folders by a group name. for example

Lab1-Day, Lab1-Night groups would be assigned the No Access to d:\coursdata\day and d:\coursedata\night 


Viewing all articles
Browse latest Browse all 21975

Latest Images

Trending Articles



Latest Images

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