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 }