From 2248f91d254443d0eeb1d0903b8fb6fabe864035 Mon Sep 17 00:00:00 2001 From: Karl-Wilfried Zimmer Date: Mon, 15 Jul 2024 21:05:54 +0200 Subject: [PATCH] snap --- NewProject2.ps1 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/NewProject2.ps1 b/NewProject2.ps1 index 0d110bd..ea52476 100644 --- a/NewProject2.ps1 +++ b/NewProject2.ps1 @@ -70,9 +70,7 @@ if($PSBoundParameters.ContainsKey("ProjectName")){ $rid = $ReadTarget.SID $wid = $WriteTarget.SID $fsrr = "ReadAndExecute" - $fsrw = "Modify" - $fsrad = "CreateDirectories" - $fsraf = "CreateFiles " + $fsrw = "Write" $type = "Allow" @@ -81,10 +79,10 @@ if($PSBoundParameters.ContainsKey("ProjectName")){ $FolderACL= Get-Acl -Path $folder $FolderACL.SetAccessRule($fileSystemAccessRuleR) - Set-Acl -Path $folder.FullName -AclObject $FolderACL + Set-Acl -Path $folder -AclObject $FolderACL $FolderACL= Get-Acl -Path $folder $FolderACL.SetAccessRule($fileSystemAccessRuleW) - Set-Acl -Path $folder.FullName -AclObject $FolderACL + Set-Acl -Path $folder -AclObject $FolderACL return $ret }