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
|
$folder = New-Item -Path $projPath -ItemType Directory
|
||||||
|
|
||||||
$ReadTarget = $acls | Where-Object Name -Match ".*RW"
|
$ReadTarget = $acls | Where-Object Name -Match ".*-RW"
|
||||||
$WriteTarget = $acls | Where-Object Name -Match ".*RO"
|
$WriteTarget = $acls | Where-Object Name -Match ".*-RO"
|
||||||
|
Write-Host $ReadTarget.Name
|
||||||
|
Write-Host $WriteTarget.Name
|
||||||
|
|
||||||
$Parameters = @{
|
$Parameters = @{
|
||||||
Name=$ProjectName
|
Name=$ProjectName
|
||||||
Path=$projPath
|
Path=$projPath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$share = New-SmbShare @Parameters
|
$share = New-SmbShare @Parameters
|
||||||
$share|Set-SmbShare -FolderEnumerationMode AccessBased
|
$share|Set-SmbShare -FolderEnumerationMode AccessBased
|
||||||
|
$share|Grant-SmbShareAccess -AccountName $ReadTarget.Name -AccessRight Read
|
||||||
|
$share|Grant-SmbShareAccess -AccountName $WriteTarget.Name -AccessRight Change
|
||||||
|
|
||||||
return $ret
|
return $ret
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user