smal steps

This commit is contained in:
Karl-Wilfried Zimmer 2024-07-15 20:55:16 +02:00
parent b1d0662ec0
commit e1458836ce

View File

@ -65,6 +65,7 @@ if($PSBoundParameters.ContainsKey("ProjectName")){
$FolderACL= Get-Acl -Path $folder $FolderACL= Get-Acl -Path $folder
$FolderACL.SetAccessRuleProtection($true,$false) $FolderACL.SetAccessRuleProtection($true,$false)
Set-Acl -Path $folder.FullName -AclObject $FolderACL
$rid = $ReadTarget.SID $rid = $ReadTarget.SID
$wid = $WriteTarget.SID $wid = $WriteTarget.SID
@ -80,13 +81,21 @@ if($PSBoundParameters.ContainsKey("ProjectName")){
$fileSystemAccessRuleWR = New-Object System.Security.AccessControl.FileSystemAccessRule($wid,$fsrr,"ContainerInherit, ObjectInherit","None",$type) $fileSystemAccessRuleWR = New-Object System.Security.AccessControl.FileSystemAccessRule($wid,$fsrr,"ContainerInherit, ObjectInherit","None",$type)
$fileSystemAccessRuleWAF = New-Object System.Security.AccessControl.FileSystemAccessRule($wid,$fsraf,"ContainerInherit, ObjectInherit","Synchronize",$type) $fileSystemAccessRuleWAF = New-Object System.Security.AccessControl.FileSystemAccessRule($wid,$fsraf,"ContainerInherit, ObjectInherit","Synchronize",$type)
$fileSystemAccessRuleWAD = New-Object System.Security.AccessControl.FileSystemAccessRule($wid,$fsrad,"ContainerInherit, ObjectInherit","Synchronize",$type) $fileSystemAccessRuleWAD = New-Object System.Security.AccessControl.FileSystemAccessRule($wid,$fsrad,"ContainerInherit, ObjectInherit","Synchronize",$type)
$FolderACL= Get-Acl -Path $folder
$FolderACL.SetAccessRule($fileSystemAccessRuleR) $FolderACL.SetAccessRule($fileSystemAccessRuleR)
Set-Acl -Path $folder.FullName -AclObject $FolderACL
$FolderACL= Get-Acl -Path $folder
$FolderACL.SetAccessRule($fileSystemAccessRuleW) $FolderACL.SetAccessRule($fileSystemAccessRuleW)
Set-Acl -Path $folder.FullName -AclObject $FolderACL
$FolderACL= Get-Acl -Path $folder
$FolderACL.SetAccessRule($fileSystemAccessRuleWR) $FolderACL.SetAccessRule($fileSystemAccessRuleWR)
Set-Acl -Path $folder.FullName -AclObject $FolderACL
$FolderACL= Get-Acl -Path $folder
$FolderACL.SetAccessRule($fileSystemAccessRuleWAF) $FolderACL.SetAccessRule($fileSystemAccessRuleWAF)
Set-Acl -Path $folder.FullName -AclObject $FolderACL
$FolderACL= Get-Acl -Path $folder
$FolderACL.SetAccessRule($fileSystemAccessRuleWAD) $FolderACL.SetAccessRule($fileSystemAccessRuleWAD)
Set-Acl -Path $folder.FullName -AclObject $FolderACL Set-Acl -Path $folder.FullName -AclObject $FolderACL
return $ret return $ret