Need help creating a powershell script for automatically creating Xtemp and Ytemp temporary folders with permissions
The folders to be created have the following path
\\contoso.local\home\homeshare\<username>\home\Xtemp\Xtemparchive
\\contoso.local\home\homeshare\<username>\home\Ytemp
The users should have write access within these folders
Looking to create a powershell script that takes the username as an input parameter, and executes the following file system operations
Create the user-folder \\contoso.local\home\homeshare\<username>
Disable inheritance at the level \\contoso.local\home\homeshare\<username> and convert all inherited file system permissions to explicit permissions
Change owner to <username>
Give the following groups Full Control:
SYSTEM
Administrators
GroupA
GroupB
Give the <username> Read & Execute Permissions
Remove all other permissions from the <username> folder
Create the folder called “home” within the <username> folder
Create the XTemp folders \\contoso.local\home\homeshare\<username>\home\Xtemp\Xtemparchive
Create the Ytemp folders \\contoso.local\home\homeshare\<username>\home\Ytemp
Add Modify-permissions for <username> at the level \\akelius01.intern\home\homeshares\<username>\Home\d3_temp\
Add Modify-permissions for <username> at the level \\contoso.local\home\homeshare\<username>\home\Ytemp
Creating Xtemp and Ytemp temporary folders
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
-
- Posts: 1
- Last visit: Wed Jun 22, 2022 9:28 am
Re: Creating Xtemp and Ytemp temporary folders
Unfortunately, technical forums are not places to ask for free code writing or consulting. You can find many coders on the Internet who will write code for you for a reasonable fee.
You can also access the resources and videos on this site that will help you learn how to write PowerShell code.
You can also access the resources and videos on this site that will help you learn how to write PowerShell code.