Hey Guys,
Struggling with this one, hoping this is an easy one for someone whos more adept with PowerShell than me. I want to set target_free_space across all volumes on a filer.. the below command works fine for individual ones:
Set-NaSnapshotAutodelete volname target_free_space 5
However I want to do this for all volumes, I have tried the below code
get-navol | Get-NaSnapshotAutodelete | Set-NaSnapshotAutodelete target_free_space 5
However this doesn't work, so tried this instead
$volume = get-navol
Set-NaSnapshotAutodelete $volume.name target_free_space 5
But this doesn't work either, what am I doing wrong? The error with he last one is
+ Set-NaSnapshotAutodelete $volume.name target_free_space 5
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Set-NaSnapshotAutodelete], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,DataONTAP.PowerShell.SDK.Cmdlets.Aggr.SetNaSnapshotAutodelete