Hello @JGPSHNTAP,
I'm not quite sure I understand your request. I think what you're asking for is to have "Update-NcXXXXX" cmdlets for each of the properties associated with a volume (among other objects)?
If that's true, then I do sympathize with your sentiment as it would make the most sense from a usability perspective. However, the ONTAP modules are created to mimic ZAPI functionality. In this instance, these volume attributes are all updated by the "volume-modify-iter" ZAPI (which maps to the "Update-NcVol" cmdlet).
I can not (and will not try to) rationalize or justify the engineering decision behind this since I wasn't a part of it, but I do also empathize with the engineering team. Having each of these be a separate cmdlet (really, multiple cmdlets, since there would be both a Get and Set/Update cmdlet, and in some cases a Remove too) would create a tremendous number of additional cmdlets, easily several hundred, which need to be individually maintained and updated.
Again, while I'm not defending the current status, it is quite easy to select the volumes using a query:
Get-NcVol -Query @{ VolumeVserverDrProtectionAttributes = @{ VserverDrProtection = "!protected" } }
And, updating them is similarly easy:
# update all volumes from anything other than "protected" to "protected"
Update-NcVol -Query @{ Vserver = $svmName; VolumeVserverDrProtectionAttributes = @{ VserverDrProtection = "!protected" } } -Attributes @{ VolumeVserverDrProtectionAttributes = @{ VserverDrProtection = "protected" } }
# update only specific volumes
Update-NcVol -Query @{ Name = "protectMe_*"; Vserver = $svmName; VolumeVserverDrProtectionAttributes = @{ VserverDrProtection = "!protected" } } -Attributes @{ VolumeVserverDrProtectionAttributes = @{ VserverDrProtection = "protected" } }
For those which you find yourself using frequently, you could create your own cmdlets. I have examples of how to do that for QoS here.
Hope that helps.
Andrew
If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.