Need assistance with a Powershell script for automatically creating Xtemp and Ytemp temporary folders
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
-Give the following groups Full Control:
SYSTEM
Administrators
GroupA
GroupB
-Give the Read & Execute Permissions
-Remove all other permissions from the folder
-Create the folder called “home” within the 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 at the level \contoso.local\home\homeshares<username>\Home\Xtemp\
-Add Modify-permissions for at the level \contoso.local\home\homeshare<username>\home\Ytemp