<?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: Get-Content Add-Content in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-Content-Add-Content/m-p/90711#M3987</link>
    <description>&lt;P&gt;I need a little more informatoin .. whats in the file.. Second what is your ultimate goal?&lt;/P&gt;</description>
    <pubDate>Fri, 03 Oct 2014 13:34:33 GMT</pubDate>
    <dc:creator>JGPSHNTAP</dc:creator>
    <dc:date>2014-10-03T13:34:33Z</dc:date>
    <item>
      <title>Get-Content Add-Content</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-Content-Add-Content/m-p/90705#M3985</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to pull data from one file to another&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;gc "c:\file1.txt"&amp;nbsp;| ? {$_ -match "lun:/vol/"} | Add-Content "c:\file2.txt"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but this fails:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$source = Read-Host "enter full path to source file"&lt;BR /&gt;$dest = Read-Host "enter full path to destination file"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;gc $source | ? {$_ -match "lun:/vol/"} | Add-Content $dest&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Get-Process : A positional parameter cannot be found that accepts argument 'gc'.&lt;BR /&gt;At C:\perf_file.ps1:11 char:3&lt;BR /&gt;+ PS &amp;lt;&amp;lt;&amp;lt;&amp;lt; C:\&amp;gt; gc $source | ? {$_ -match "lun:/vol/"} | Add-Content $dest&lt;BR /&gt;+ CategoryInfo : InvalidArgument: (:) [Get-Process], ParameterBindingException&lt;BR /&gt;+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.GetProcessCommand&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what am I doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Joel&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 05:27:55 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-Content-Add-Content/m-p/90705#M3985</guid>
      <dc:creator>JSHACHER11</dc:creator>
      <dc:date>2025-06-05T05:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Get-Content Add-Content</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-Content-Add-Content/m-p/90711#M3987</link>
      <description>&lt;P&gt;I need a little more informatoin .. whats in the file.. Second what is your ultimate goal?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2014 13:34:33 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-Content-Add-Content/m-p/90711#M3987</guid>
      <dc:creator>JGPSHNTAP</dc:creator>
      <dc:date>2014-10-03T13:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Get-Content Add-Content</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-Content-Add-Content/m-p/90713#M3988</link>
      <description>&lt;P&gt;it's just a text file with performance information&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example, the file contains a lot of lines about 'volume' stats and I want to take only the lines that say 'read_align_histo' and put it in a different file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;like I said, it works fine, it's just&amp;nbsp;when I use the 'Read-Host' that it fails&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2014 13:41:13 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-Content-Add-Content/m-p/90713#M3988</guid>
      <dc:creator>JSHACHER11</dc:creator>
      <dc:date>2014-10-03T13:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Get-Content Add-Content</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-Content-Add-Content/m-p/90715#M3989</link>
      <description>&lt;P&gt;Hello Joel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you use the Get-Content cmdlet name itself in place of "gc", also please check if the alias is pointing to get-process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is how the the output for the alias gc should show up&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS C:\&amp;gt; Get-Alias -Name gc&lt;/P&gt;&lt;P&gt;CommandType Name ModuleName&lt;BR /&gt;----------- ---- ----------&lt;BR /&gt;Alias gc -&amp;gt; Get-Content&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried it in my lab and it worked fine, i guess there is some issue with the alias redirecting itself to "Get-Process"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinith&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2014 14:13:34 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-Content-Add-Content/m-p/90715#M3989</guid>
      <dc:creator>vinith</dc:creator>
      <dc:date>2014-10-03T14:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Get-Content Add-Content</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-Content-Add-Content/m-p/90719#M3990</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;apologies!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my fault. my script was like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS C:&amp;gt; gc ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;instaed of:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;gc ..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;POSH didn't know how to read the 'PS' (obviously)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img id="smileyembarrassed" class="emoticon emoticon-smileyembarrassed" src="https://community.netapp.com/i/smilies/16x16_smiley-embarrassed.png" alt="Smiley Embarassed" title="Smiley Embarassed" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2014 14:25:45 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Get-Content-Add-Content/m-p/90719#M3990</guid>
      <dc:creator>JSHACHER11</dc:creator>
      <dc:date>2014-10-03T14:25:45Z</dc:date>
    </item>
  </channel>
</rss>

