Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Anyone know how to do this? I don't see a -snapshotpolicy field in update-ncvol
I tried using a template, but the object returned does not have an volumesnapshotattributes object.
I also tried $cmd2 = "volume modify -vserver $svm -volume $volname -snapshot-policy none -confirm $false"
invoke-ncssh $cmd2
I need to change snapshot policies on a volume, but I can't figure this one out
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Stephen,
I'm pretty sure I saw something written by Steven Beam somewhere which I used, but can't remember where.
Anyway, this is an extract of one of my WFA commands which should indicate how it works:
$VOLquery = Get-NcVol -Template
Initialize-NcObjectProperty -Object $VOLquery -Name VolumeIdAttributes
$VOLquery.VolumeIdAttributes.OwningVserverName = $VserverName
$VOLattrs = Get-NcVol -Template
Initialize-NcObjectProperty -Object $VOLattrs -Name VolumeSnapshotAttributes
$VOLquery.VolumeIdAttributes.Name = $VolName
$VOLattrs.VolumeSnapshotAttributes.SnapshotPolicy = $SnapshotPolicy
Update-NcVol -Query $VOLquery -Attributes $VOLattrs
Hope it helps.
Cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks - just what I needed
