<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Volume Snapshot Policy in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Volume-Snapshot-Policy/m-p/98766#M4094</link>
    <description>&lt;P&gt;Hi Guys,&amp;nbsp;&lt;/P&gt;&lt;P&gt;using Ontap PS toolkit i can get the snapshot policy for a volume.&lt;/P&gt;&lt;P&gt;i need to get the amount of days in that policy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So when i use this command:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(Get-NcSnapshotPolicy)[0].SnapshotPolicySchedules&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;i get the following output:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;&lt;STRONG&gt;Count : 14&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;STRONG&gt;NcController : nadrp1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Prefix : daily&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;Schedule : daily&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;STRONG&gt;SnapmirrorLabel : -&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;CountSpecified : True&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count : 24&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;NcController : nadrp1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Prefix : hourly&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Schedule : hourly&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;SnapmirrorLabel : -&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;CountSpecified : True&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want to ask if (&lt;STRONG&gt;&lt;FONT color="#800000"&gt;Schedule&lt;/FONT&gt;&lt;/STRONG&gt; is&amp;nbsp;daily) and get the&amp;nbsp;&lt;FONT color="#000080"&gt;&lt;STRONG&gt;Count &lt;/STRONG&gt;&lt;FONT color="#000000"&gt;field.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;but because count is a build in command in every powershell array, when i use count (ie: (Get-NcSnapshotPolicy)[0].SnapshotPolicySchedules.count&amp;nbsp; ) i get the count of rows in the array and NOT the '&lt;FONT color="#000080"&gt;&lt;STRONG&gt;14&lt;/STRONG&gt;&lt;/FONT&gt;' value i expect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any idea ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tomer Shoshan.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jun 2025 05:21:08 GMT</pubDate>
    <dc:creator>tomers</dc:creator>
    <dc:date>2025-06-05T05:21:08Z</dc:date>
    <item>
      <title>Volume Snapshot Policy</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Volume-Snapshot-Policy/m-p/98766#M4094</link>
      <description>&lt;P&gt;Hi Guys,&amp;nbsp;&lt;/P&gt;&lt;P&gt;using Ontap PS toolkit i can get the snapshot policy for a volume.&lt;/P&gt;&lt;P&gt;i need to get the amount of days in that policy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So when i use this command:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(Get-NcSnapshotPolicy)[0].SnapshotPolicySchedules&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;i get the following output:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;&lt;STRONG&gt;Count : 14&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;STRONG&gt;NcController : nadrp1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Prefix : daily&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;Schedule : daily&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;STRONG&gt;SnapmirrorLabel : -&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;CountSpecified : True&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count : 24&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;NcController : nadrp1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Prefix : hourly&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Schedule : hourly&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;SnapmirrorLabel : -&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;CountSpecified : True&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want to ask if (&lt;STRONG&gt;&lt;FONT color="#800000"&gt;Schedule&lt;/FONT&gt;&lt;/STRONG&gt; is&amp;nbsp;daily) and get the&amp;nbsp;&lt;FONT color="#000080"&gt;&lt;STRONG&gt;Count &lt;/STRONG&gt;&lt;FONT color="#000000"&gt;field.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;but because count is a build in command in every powershell array, when i use count (ie: (Get-NcSnapshotPolicy)[0].SnapshotPolicySchedules.count&amp;nbsp; ) i get the count of rows in the array and NOT the '&lt;FONT color="#000080"&gt;&lt;STRONG&gt;14&lt;/STRONG&gt;&lt;/FONT&gt;' value i expect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any idea ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tomer Shoshan.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 05:21:08 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Volume-Snapshot-Policy/m-p/98766#M4094</guid>
      <dc:creator>tomers</dc:creator>
      <dc:date>2025-06-05T05:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Volume Snapshot Policy</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Volume-Snapshot-Policy/m-p/98767#M4095</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;so i had overcome this in some way but its not idle&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;does anyone have any other idea ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my current resolution &amp;nbsp;is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$CurrParentPolicy = (Get-NcSnapshotPolicy | where {$_.Policy -like $CurrParentVol.VolumeSnapshotAttributes.SnapshotPolicy}).SnapshotPolicySchedules | Where &amp;nbsp;{$_.Schedule -like 'day*' -or $_.Schedule -like 'daily*'}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;because i found out that if you filter it this deep, &amp;nbsp;when you run "&lt;STRONG&gt;$CurrParentPolicy.count&lt;/STRONG&gt;" it will return the array count filed (and not the build in command)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so if you run:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$CurrParentPolicy&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;you get this result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Count : &lt;STRONG&gt;14&lt;/STRONG&gt;&lt;BR /&gt;NcController : nadrp1&lt;BR /&gt;Prefix : daily&lt;BR /&gt;Schedule : daily&lt;BR /&gt;SnapmirrorLabel : -&lt;BR /&gt;CountSpecified : True&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and when you run&amp;nbsp;&lt;STRONG&gt;$CurrParentPolicy.Count&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;you get&lt;STRONG&gt; 14&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tomer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Dec 2014 09:38:37 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Volume-Snapshot-Policy/m-p/98767#M4095</guid>
      <dc:creator>tomers</dc:creator>
      <dc:date>2014-12-30T09:38:37Z</dc:date>
    </item>
  </channel>
</rss>

