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= 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
|
||||||
@ -81,12 +82,20 @@ if($PSBoundParameters.ContainsKey("ProjectName")){
|
|||||||
$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
|
||||||
|
Loading…
Reference in New Issue
Block a user