<?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 Get-NaSnapmirror truncates output to a file in ONTAP Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Discussions/Get-NaSnapmirror-truncates-output-to-a-file/m-p/41334#M9746</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to write a PS script to get status of my snapmirrors.&lt;/P&gt;&lt;P&gt;I need Source Volume, Destination Volume, Status, LagTimeTS,&amp;nbsp; State&lt;/P&gt;&lt;P&gt;However when I view the file the names of the volumes are truncated, and all the columns do not show.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried various suggestions I saw from my googled results, but nothing seems to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Powershell and I are not well acquainted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have a suggestion ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---- walter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jun 2025 05:58:58 GMT</pubDate>
    <dc:creator>wnorthmtitsd</dc:creator>
    <dc:date>2025-06-05T05:58:58Z</dc:date>
    <item>
      <title>Get-NaSnapmirror truncates output to a file</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Get-NaSnapmirror-truncates-output-to-a-file/m-p/41334#M9746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to write a PS script to get status of my snapmirrors.&lt;/P&gt;&lt;P&gt;I need Source Volume, Destination Volume, Status, LagTimeTS,&amp;nbsp; State&lt;/P&gt;&lt;P&gt;However when I view the file the names of the volumes are truncated, and all the columns do not show.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried various suggestions I saw from my googled results, but nothing seems to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Powershell and I are not well acquainted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have a suggestion ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---- walter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2025 05:58:58 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Get-NaSnapmirror-truncates-output-to-a-file/m-p/41334#M9746</guid>
      <dc:creator>wnorthmtitsd</dc:creator>
      <dc:date>2025-06-05T05:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Get-NaSnapmirror truncates output to a file</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Get-NaSnapmirror-truncates-output-to-a-file/m-p/41338#M9747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Walter,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; You need to specify the format settings with powershell.&amp;nbsp; I don't take credit for the code below as I found it in another post a long time ago.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ft @ means to set format table(ft) using the conditions specified (@).&lt;/P&gt;&lt;P&gt;Expression is the object/property you want to show&lt;/P&gt;&lt;P&gt;Label is what you want it to show&lt;/P&gt;&lt;P&gt;Width sets the column width&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt; &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD&gt;$arrays | foreach-object {$c = Connect-NaController $_ -Credential $cred; Get-Nasnapmirror | Where-Object{$_.LagTime -gt $overLag}&amp;nbsp; | Select Source,Destination,Status,LagtimeTS| `&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD&gt;ft @{Expression={$_.Source};Label="Source";Width=60},@{Expression={$_.Destination};Label="Destination";Width=160},@{Expression={$_.status};Label="status";width=20}, `&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;TD&gt;@{N='Current Lag Time';E={'{0} days, {1} hrs, {2} mins, {3} secs' -f $_.LagTimeTS.days, $_.LagTimeTS.Hours, $_.LagTimeTS.Minutes, $_.LagTimeTS.Seconds}}}&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 17:21:01 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Get-NaSnapmirror-truncates-output-to-a-file/m-p/41338#M9747</guid>
      <dc:creator>cscott</dc:creator>
      <dc:date>2013-07-08T17:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Get-NaSnapmirror truncates output to a file</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Get-NaSnapmirror-truncates-output-to-a-file/m-p/41347#M9748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Scott,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I finally figured out that I can use foreach-object.and was able to get the info I wanted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Powershell is overly complex in my opinion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--- walter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 18:02:02 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Get-NaSnapmirror-truncates-output-to-a-file/m-p/41347#M9748</guid>
      <dc:creator>wnorthmtitsd</dc:creator>
      <dc:date>2013-07-08T18:02:02Z</dc:date>
    </item>
  </channel>
</rss>

