Microsoft Virtualization Discussions
I hope that you can help.
I want to rename a bunch of CIFS shares using the PSTK - I don't think you can technically rename a share so I am creating/deleting. I'm using the following to retrieve the current share properties that I am interested in keeping:
$oldshareproperties = Get-NcCifsShare -Name $oldshare |
I'm then creating some variables to create the new share name with the existing properties:
$newshare = "$($oldshareproperties.ShareName)RO$"
$activepath = $oldshareproperties.Path
$newcomment = "READ ONLY $($oldshareproperties.Comment)"
$newofflinemode = $oldshareproperties.OfflineFilesMode
$newproperties = $oldshareproperties.ShareProperties
Add-NcCifsShare -Name $newshare -Path $activepath -Comment $newcomment -OfflineFilesMode $newofflinemode -ShareProperties $newproperties
I can capture the ACL (everyone / read) from the existing share but how do I turn these into arguments for the Set-NcCifsShareAcl, i.e. -UserOrGroup and -Permission?
Let's walk you through the new & improved Knowledge Base and further enrich your experience with NetApp Products.
Join our Discord Community