From 1832cbae334d2ad50bc29745e48e2b8aa26f773e Mon Sep 17 00:00:00 2001 From: Karl-Wilfried Zimmer Date: Mon, 15 Jul 2024 00:08:51 +0200 Subject: [PATCH] fixed acl issue --- NewProject2.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NewProject2.ps1 b/NewProject2.ps1 index 45432b3..f6c30cd 100644 --- a/NewProject2.ps1 +++ b/NewProject2.ps1 @@ -72,9 +72,9 @@ if($PSBoundParameters.ContainsKey("ProjectName")){ $type = "Allow" - $fileSystemAccessRuleR = New-Object System.Security.AccessControl.FileSystemAccessRule($rid.Name,$fsrr,"ContainerInherit, ObjectInherit","None",$type) - $fileSystemAccessRuleW = New-Object System.Security.AccessControl.FileSystemAccessRule($wid.Name,$fsrw,"ContainerInherit, ObjectInherit","None",$type) - $fileSystemAccessRuleWR = New-Object System.Security.AccessControl.FileSystemAccessRule($wid.Name,$fsrr,"ContainerInherit, ObjectInherit","None",$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) + $fileSystemAccessRuleWR = New-Object System.Security.AccessControl.FileSystemAccessRule($wid,$fsrr,"ContainerInherit, ObjectInherit","None",$type) $FolderACL.SetAccessRule($fileSystemAccessRuleR) $FolderACL.SetAccessRule($fileSystemAccessRuleW)