diff --git a/NewProject2.ps1 b/NewProject2.ps1 index 1ad618f..4883786 100644 --- a/NewProject2.ps1 +++ b/NewProject2.ps1 @@ -74,8 +74,8 @@ if($PSBoundParameters.ContainsKey("ProjectName")){ $type = "Allow" - $fileSystemAccessRuleR = New-Object System.Security.AccessControl.FileSystemAccessRule($rid,$fsrr,$type) - $fileSystemAccessRuleW = New-Object System.Security.AccessControl.FileSystemAccessRule($wid,$fsrw,$type) + $fileSystemAccessRuleR = New-Object System.Security.AccessControl.FileSystemAccessRule($rid,$fsrr,"ContainerInherit,ObjectInherit","None",$type) + $fileSystemAccessRuleW = New-Object System.Security.AccessControl.FileSystemAccessRule($wid,$fsrw,"ContainerInherit,ObjectInherit","None",$type) $FolderACL= Get-Acl -Path $folder $FolderACL.SetAccessRule($fileSystemAccessRuleR)