From 8c134c550f924c59251e1cf64d5ed34177c94588 Mon Sep 17 00:00:00 2001 From: Karl-Wilfried Zimmer Date: Mon, 15 Jul 2024 22:25:14 +0200 Subject: [PATCH] put in inheritance --- NewProject2.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)