Create groups based on folder names – concatenation problem ?

Hello, I’m trying to create 3 AD groups for each child folder found in the root shared folder. I have to stick to this naming convention : “GoupScope”“FolderName”“Permission” Permissions are R=Read, W=Write, CT=Full Control So in my case : DL_FOLDER_R DL_FOLDER_W and DL_FOLDER_CT

The problem I have is, I believe, concatenation of the result of Get-ChildItem command and strings to be placed before and after this command result.

Here is the script I wrote on PasteBin

Based on what I found online, I tried : “DL+$child+_R” “DL“+$child+”R” “DL“+”$child”+”_R”

Nothing appear to work.

Do you guys have any idea to help me ?

PS : Sorry if my english is not perfect, I’m french and do not pratice english often.

submitted by /u/Polluxtroy3758
[link] [comments]

Leave a Reply