networktest passed
This commit is contained in:
parent
b243ac2a36
commit
9d9daa33a9
@ -58,17 +58,22 @@ if($PSBoundParameters.ContainsKey("ProjectName")){
|
||||
|
||||
$folder = New-Item -Path $projPath -ItemType Directory
|
||||
|
||||
$ReadTarget = $acls | Where-Object Name -Match ".*RW"
|
||||
$WriteTarget = $acls | Where-Object Name -Match ".*RO"
|
||||
$ReadTarget = $acls | Where-Object Name -Match ".*-RW"
|
||||
$WriteTarget = $acls | Where-Object Name -Match ".*-RO"
|
||||
Write-Host $ReadTarget.Name
|
||||
Write-Host $WriteTarget.Name
|
||||
|
||||
$Parameters = @{
|
||||
Name=$ProjectName
|
||||
Path=$projPath
|
||||
}
|
||||
|
||||
|
||||
|
||||
$share = New-SmbShare @Parameters
|
||||
$share|Set-SmbShare -FolderEnumerationMode AccessBased
|
||||
|
||||
$share|Grant-SmbShareAccess -AccountName $ReadTarget.Name -AccessRight Read
|
||||
$share|Grant-SmbShareAccess -AccountName $WriteTarget.Name -AccessRight Change
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user