Hello Peter,
In case you want to avoid using tools, or really want to keep it simple, a script along the lines of the one given below should get the job done.
This script would create a CSV file with the Path, Acl, ShareName, Volume name and VolumeSize of all shares on a 7mode system. If you need any additional data, you need to determine which cmdlet will return the data and then extend the script. You would also need to add error handling.
param([String]$output_name)
"Share Name, Mount Point, Volume Name, Volume Size, ACL Information" | Out-File $output_name #Writes the Excel headers
$shares = Get-NaCifsShare #Get a list of all shares in the system
foreach ($share in $shares) {
$share_name = $share.ShareName
$vol_name = ($share.MountPoint -split "/")[2] #Since mountpoint will always be of form /vol/vol_name/<possibly something_else> and splitting produces null,vol,vol_name,<something_else>
if ($vol_name -eq $null) { continue } #Helps skip the admin shares like /etc
$vol_size = (Get-NaVolSize $vol_name).VolumeSize #If you require any other volume attributes, Get-NaVol should return those
$acl_information_array = (Get-NaCifsShareAcl $share_name).UserAclInfo
$acl_information = $acl_information_array -join ';' #Converting the array in to a string and using ; as delimiter since , is used as delimiter in the CSV
$share_name + "," + $share.MountPoint + "," + $vol_name + "," + $vol_size + "," + $acl_information | Out-File $output_name -Append #Append the row
}
You will probably want to add cases for qtress at the very least before using this (i.e. if a share is a qtree, rather than a volume, do you want the Qtree information as well?). But hopefully this will help you start.
Regards,
Aparajita