When I originally deployed some sites I would have a powershell script that would set the "show-previous-versions" property of a share using the following line:
Invoke-NcSsh vserver cifs share properties add -share-name sharename$ -share-properties access-based-enumeration show-previous-versions
However,
I have some older sites where this was not done, and I was trying to think of an easy way to loop through each share and set this. I have tried a couple things but have had no luck. Even the latest toolkit documentaion does not even show that as a property of "ShareProperties" on the Set-NcCifsSHare commandlet. I tries many different variations of the below syntax...I feel I am missing something simple.
Is there an easy way to do this that I am missing to get this done, but avoid doing it to the normal "admin$,c$ and ipc$" shares?
$shares = Get-NcCifsShare
foreach ($share in $shares | where $_.sharename -notmatch "$"){Invoke-NcSsh vserver cifs share properties add -share-name $share.shareName -share-properties access-based-enumeration show-previous-versions}