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?
NetApp Wins One Silver and One Bronze Stevie® Award in 2022 Stevie Awards for Sales and Customer Service
Live Chat, Watch Parties, and More!
Engage digitally throughout the sales process, from product discovery to conﬁguration, and handle all your post-purchase needs.