Hi Martin,
For 7-mode, there is an easier way... the help documentation includes the required privileges for each cmdlet. For example:
PS C:\> Get-NaHelp Get-NaVol | select Privilege
Privilege
---------
{api-volume-list-info-iter-start, api-volume-list-info-iter-next, api-volume-list-info-iter-end, api-volume-list-info}
For the clustered ONTAP cmdlets, there is a little bit more work you need to do. The help documents list the API the command uses, then you need to use that information to map the API to a CLI command using the "show-ontapi" CLI command. For example:
PS C:\Users\SBeam> Get-NcHelp Get-NcVol | select API
Api
---
{volume-get-iter}
PS C:\Users\SBeam> Invoke-NcSsh "security login role show-ontapi -ontapi volume-get-iter"
NcController : 10.61.167.254
Value :
ONTAPI Name: volume-get-iter
CLI Command: volume show
Thanks,
Steven