Script : Create home file for each user with permission & A collecting file

Hello, Powershell newbie here.

There is only two kind of user, a group called “OnlineTrainer” and other group called “Trainees”, Domain name is “OnlineXYZ”.

Is it possible to build a script(or several scripts) including follow requirement:

A1. A individual share folder will be created in F:\OnlineDC\personal%username%\ and automatically mapped as F: drive after each user login.

A2. The individual share folder of each user will have a quota 8GB at a warning level 6GB.

A3. The share folder is only available for their own user and Admin group (full access right), other user will not have any access permission.

B1. All trainers will have an additional network share folder for their own in G:\OnlineDC\DropAndPick%trainername%\ where all trainees and trainers could put files in it but they could not read files uploaded by others. Only the file owner and trainers could read, write and delete those files.

B2: The network share folder with a quota of 40GB will be automatically mapped as G: drive for all the users (including trainees)

I have created OnlineTrainer group, Trainees group, all users in these two group, F: drive and G: drive.

I hope there is no info missing.

Any help is greatly appreciated, thank you.

Wing Yam, welcome to Powershell.org. Please take a moment and read the very first post on top of the list of this forum: Read Me Before Posting! You’ll be Glad You Did!.

This forum is for scripting questions rather than script requests. We do not write customized and ready to use scripts or solutions on request.

We expect you to make an own attempt to get your task done or to solve your problem. If you have done so already please document here what exactly you have done and show your code. Then we probably might be able to help you step further.

To answer your question in short: yes it is. And there are probably at least a thousand examples out there for you to adapt to your special needs. But you have to search them by yourself.

Some of your requirements are usually done by the configuration of the infrastructure … like the shares on a file server. You configure this once by GPOs or quota rules … there’s no additional script needed.