Microsoft Virtualization Discussions

Powershell command for adding existing snapshot policy to a volume -

NwkThd_04
2,435 Views

Hello Team, 

 

Anyone please help me to find the command  for adding  existing snapshot policy to a volume 

 

I have tried with  " get-ncvol volume name  -Vserver  vserver name   |  Set-NcSnapshotPolicy   policy name" but failed 

 Also  I was trying  update-ncvol  as well , but could not  find snapshotpolicy name option there.

it looks like I am not using the current context?

I am using powershell tool kit 9.8.xx 

Thanking you in advance.

 

Regards,

 

Shyju.

1 REPLY 1

ajeffrey
2,346 Views

Hi There

I was able to get this to work but only after creating a snapshot policy with a scope of the particular Storage VM

Screen Shot 2021-07-02 at 10.55.11 AM.png

PS C:\Users\Administrator> Get-NcVol -Vserver FP-Test | Set-NcSnapshotPolicy -Name test

Policy Enabled SnapshotPolicySchedules
------ ------- -----------------------
test True {hourly (0), daily (0), weekly (1)}
test True {hourly (0), daily (0), weekly (1)}
test True {hourly (0), daily (0), weekly (1)}
test True {hourly (0), daily (0), weekly (1)}
test True {hourly (0), daily (0), weekly (1)}
test True {hourly (0), daily (0), weekly (1)}
test True {hourly (0), daily (0), weekly (1)}
test True {hourly (0), daily (0), weekly (1)}
test True {hourly (0), daily (0), weekly (1)}
test True {hourly (0), daily (0), weekly (1)}
test True {hourly (0), daily (0), weekly (1)}

Public