Hi Guys,
using Ontap PS toolkit i can get the snapshot policy for a volume.
i need to get the amount of days in that policy.
So when i use this command:
(Get-NcSnapshotPolicy)[0].SnapshotPolicySchedules
i get the following output:
Count : 14
NcController : nadrp1
Prefix : daily
Schedule : daily
SnapmirrorLabel : -
CountSpecified : True
Count : 24
NcController : nadrp1
Prefix : hourly
Schedule : hourly
SnapmirrorLabel : -
CountSpecified : True
i want to ask if (Schedule is daily) and get the Count field.
but because count is a build in command in every powershell array, when i use count (ie: (Get-NcSnapshotPolicy)[0].SnapshotPolicySchedules.count ) i get the count of rows in the array and NOT the '14' value i expect.
any idea ?
Thanks,
Tomer Shoshan.