smal steps
This commit is contained in:
parent
b1d0662ec0
commit
e1458836ce
@ -65,6 +65,7 @@ if($PSBoundParameters.ContainsKey("ProjectName")){
|
||||
|
||||
$FolderACL= Get-Acl -Path $folder
|
||||
$FolderACL.SetAccessRuleProtection($true,$false)
|
||||
Set-Acl -Path $folder.FullName -AclObject $FolderACL
|
||||
|
||||
$rid = $ReadTarget.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)
|
||||
$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)
|
||||
|
||||
|
||||
$FolderACL= Get-Acl -Path $folder
|
||||
$FolderACL.SetAccessRule($fileSystemAccessRuleR)
|
||||
Set-Acl -Path $folder.FullName -AclObject $FolderACL
|
||||
$FolderACL= Get-Acl -Path $folder
|
||||
$FolderACL.SetAccessRule($fileSystemAccessRuleW)
|
||||
Set-Acl -Path $folder.FullName -AclObject $FolderACL
|
||||
$FolderACL= Get-Acl -Path $folder
|
||||
$FolderACL.SetAccessRule($fileSystemAccessRuleWR)
|
||||
Set-Acl -Path $folder.FullName -AclObject $FolderACL
|
||||
$FolderACL= Get-Acl -Path $folder
|
||||
$FolderACL.SetAccessRule($fileSystemAccessRuleWAF)
|
||||
Set-Acl -Path $folder.FullName -AclObject $FolderACL
|
||||
$FolderACL= Get-Acl -Path $folder
|
||||
$FolderACL.SetAccessRule($fileSystemAccessRuleWAD)
|
||||
|
||||
Set-Acl -Path $folder.FullName -AclObject $FolderACL
|
||||
|
||||
return $ret
|
||||
|
Loading…
Reference in New Issue
Block a user