Active IQ Unified Manager Discussions
Active IQ Unified Manager Discussions
Hi,
I am writing a script to automatically apply various snapshot policies to volumes. All is working fine until I try to actually apply the policy to the volume using Update-NcVol - at this point, it prompts me for a FlexGroupVolume, despite teh fact that volume attributes were passed to the query.
My script is like this currently:
$scheduleObjects = Get-Content -Raw -Path "schedules.json" | ConvertFrom-Json Connect-NcController "x.x.x.x" foreach($scheduledBackup in $scheduleObjects) { $volumeName = $scheduledBackup | Select -ExpandProperty Volume
$datastoreName = $scheduledBackup | Select -ExpandProperty Datastore
$vserverName = $scheduledBackup | Select -ExpandProperty Vserver ## Processing creation of policies and schedules snipped for brevity ##
## I end up with a policy being created in the NA which is named $datastoreName ##
$q = Get-NcVol -Template Initialize-NcObjectProperty -Object $q -Name VolumeIdAttributes $q.VolumeIdAttributes.Name = $volumeName $q.VolumeIdAttributes.OwningVserverName = $vserverName $q.Name = $volumeName $q.Vserver = $vserverName $a = Get-NcVol -Template Initialize-NcObjectProperty -Object $a -Name VolumeSnapshotAttributes $a.VolumeSnapshotAttributes.SnapshotPolicy = $datastoreName Update-NcVol -Query $q -Attributes $a }
However, instead of applying the policy, I get a prompt:
cmdlet Update-NcVol at command pipeline position 1 Supply values for the following parameters: FlexGroupVolume:
Any help would be appreciated!
Thanks!
Solved! See The Solution
The issue was worked around by adding the flex group volume parameter into the command as $false. This appears to be a bug with the current powershell release as per https://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/NetApp-PowerShell-Toolkit-4-3-released/td-p/123976
The issue was worked around by adding the flex group volume parameter into the command as $false. This appears to be a bug with the current powershell release as per https://community.netapp.com/t5/Microsoft-Cloud-and-Virtualization-Discussions/NetApp-PowerShell-Toolkit-4-3-released/td-p/123976
Glad you found it.. I was going to reply as well :$false