<?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 Re: Powershell Pipe issues in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-Pipe-issues/m-p/445598#M6777</link>
    <description>&lt;P&gt;Trying to pipe Get-NcVol to Get-NcSnapshot directly shouldn't work since they don't use the same parameter for specifying the volume name.&amp;nbsp; Use this method to rename the parameter on a pipe:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Get-NcVol | % { Get-NcSnapshot -Volume $_.Name }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Jun 2023 14:49:37 GMT</pubDate>
    <dc:creator>RobDBA</dc:creator>
    <dc:date>2023-06-27T14:49:37Z</dc:date>
    <item>
      <title>Powershell Pipe issues</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-Pipe-issues/m-p/445340#M6773</link>
      <description>&lt;P&gt;Hi there&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This might be a PS issue more than a NetApp issue, yet I will give it a try here &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to do a list of snapshots on volumes that are older than a specific date...&lt;/P&gt;&lt;P&gt;I connect OK to the cluster, and I can go a get-ncvol with no issues.. but when I try to add pipes to it, so to get the snapshots, it complains...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so this works OK:&lt;/P&gt;&lt;P&gt;$volumes = get-ncvol&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this fails:&lt;/P&gt;&lt;P&gt;$snapshots =&amp;nbsp;get-ncvol | get-ncsnapshot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this also fails:&lt;/P&gt;&lt;P&gt;$oldsnapshots = get-ncvol | get-ncsnapshot | where-object {$_.created -lt "$maxsnapshotdesiredage"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Finding old snapshots...&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;get-ncsnapshot : Volume parameter neither specified nor set&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;At C:\Users\blah\Documents\list.ps1:15 char:17&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+ $oldsnapshots | get-ncsnapshot | where-object {$_.created -lt "$maxsn ...&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;~~~~~~~~~~~~~~&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+ CategoryInfo : NotSpecified: (:) [Get-NcSnapshot], ArgumentException&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;+ FullyQualifiedErrorId : Volume is empty,DataONTAP.C.PowerShell.SDK.Cmdlets.Snapshot.GetNcSnapshot&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;So it looks like when ever I use a |Pipe| it complains...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;PS C:\Users\blah\Documents&amp;gt; $PSVersionTable.PSVersion&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Major Minor Build Revision&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;----- ----- ----- --------&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;5 1 14409 1029&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This has been working from this Windows hosts before... so my guess it that it is some Powershell thing that has changed as it has most likely been upgraded since I last used it....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is welcome...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 09:47:36 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-Pipe-issues/m-p/445340#M6773</guid>
      <dc:creator>Beardmann</dc:creator>
      <dc:date>2025-06-04T09:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell Pipe issues</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-Pipe-issues/m-p/445553#M6776</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I had exactly the same issue.&amp;nbsp;I have solved it by bypassing the pipes in the command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$Volumes = Get-NcVol&lt;BR /&gt;$Snapshots = foreach ($Volume in $Volumes) {&lt;BR /&gt;$VolumeSnapshots = Get-NcSnapshot -Volume $Volume | Where-Object &lt;SPAN&gt;&amp;nbsp;{$_.created -lt "$maxsnapshotdesiredage"}&lt;/SPAN&gt;&lt;BR /&gt;$VolumeSnapshots&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 10:54:30 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-Pipe-issues/m-p/445553#M6776</guid>
      <dc:creator>clariion</dc:creator>
      <dc:date>2023-06-26T10:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell Pipe issues</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-Pipe-issues/m-p/445598#M6777</link>
      <description>&lt;P&gt;Trying to pipe Get-NcVol to Get-NcSnapshot directly shouldn't work since they don't use the same parameter for specifying the volume name.&amp;nbsp; Use this method to rename the parameter on a pipe:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Get-NcVol | % { Get-NcSnapshot -Volume $_.Name }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 14:49:37 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-Pipe-issues/m-p/445598#M6777</guid>
      <dc:creator>RobDBA</dc:creator>
      <dc:date>2023-06-27T14:49:37Z</dc:date>
    </item>
  </channel>
</rss>

