<?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: Ontap commands run from Powershell in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Ontap-commands-run-from-Powershell/m-p/441436#M6670</link>
    <description>&lt;P&gt;Try to look up in our forum, you might find lots of examples.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This command should return the size, created time but not sure about&amp;nbsp;&lt;SPAN&gt;state, is-constituent.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Get-NcSnapshot&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check this thread:&lt;BR /&gt;&lt;A href="https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-command-to-list-snapshot-details-for-particular-volumes/m-p/108689" target="_blank"&gt;https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-command-to-list-snapshot-details-for-particular-volumes/m-p/108689&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Following command will give more output, check it out yourself.&lt;/P&gt;&lt;P&gt;Get-NcSnapshot | ?{ $_.Created}&lt;BR /&gt;Get-NcSnapshot | ?{ $_.Created} | Export-Csv snapshot.csv&lt;BR /&gt;Note: File will get saved in your c:/drive.&lt;/P&gt;</description>
    <pubDate>Sat, 04 Feb 2023 10:06:56 GMT</pubDate>
    <dc:creator>Ontapforrum</dc:creator>
    <dc:date>2023-02-04T10:06:56Z</dc:date>
    <item>
      <title>Ontap commands run from Powershell</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Ontap-commands-run-from-Powershell/m-p/441425#M6669</link>
      <description>&lt;P&gt;Hello all, Need some help.&amp;nbsp; I want to run the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;volume snapshot show -fields create-time, size, state, is-constituent&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Using the Ontap Powershell and redirect it to a local Excel format.&amp;nbsp; I can get connected to my Clusters using the Connect-NcController, just cannot get the syntax correct for the volume command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be great.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 19:21:26 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Ontap-commands-run-from-Powershell/m-p/441425#M6669</guid>
      <dc:creator>HighmarkECB</dc:creator>
      <dc:date>2023-02-03T19:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Ontap commands run from Powershell</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Ontap-commands-run-from-Powershell/m-p/441436#M6670</link>
      <description>&lt;P&gt;Try to look up in our forum, you might find lots of examples.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This command should return the size, created time but not sure about&amp;nbsp;&lt;SPAN&gt;state, is-constituent.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Get-NcSnapshot&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check this thread:&lt;BR /&gt;&lt;A href="https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-command-to-list-snapshot-details-for-particular-volumes/m-p/108689" target="_blank"&gt;https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Powershell-command-to-list-snapshot-details-for-particular-volumes/m-p/108689&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Following command will give more output, check it out yourself.&lt;/P&gt;&lt;P&gt;Get-NcSnapshot | ?{ $_.Created}&lt;BR /&gt;Get-NcSnapshot | ?{ $_.Created} | Export-Csv snapshot.csv&lt;BR /&gt;Note: File will get saved in your c:/drive.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2023 10:06:56 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Ontap-commands-run-from-Powershell/m-p/441436#M6670</guid>
      <dc:creator>Ontapforrum</dc:creator>
      <dc:date>2023-02-04T10:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: Ontap commands run from Powershell</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Ontap-commands-run-from-Powershell/m-p/457098#M7015</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once you have successfully connected to the cluster using Connect-NcController, you can easily get the information you want by running the following script&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;script&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;# Get all snapshot information and convert the Total field to legible units&lt;BR /&gt;$snapshots = Get-NcSnapshot | Select-Object Name, Volume, Created, Total&lt;/P&gt;&lt;P&gt;#Function: Converts bytes into legible units&lt;BR /&gt;function Convert-Bytes {&lt;BR /&gt;param([long]$bytes)&lt;BR /&gt;&lt;BR /&gt;if ($bytes -lt 1KB) {&lt;BR /&gt;return "{0} B" -f $bytes&lt;BR /&gt;}&lt;BR /&gt;elseif ($bytes -lt 1MB) {&lt;BR /&gt;return "{0:N2} KB" -f ($bytes / 1KB)&lt;BR /&gt;}&lt;BR /&gt;elseif ($bytes -lt 1GB) {&lt;BR /&gt;return "{0:N2} MB" -f ($bytes / 1MB)&lt;BR /&gt;}&lt;BR /&gt;elseif ($bytes -lt 1TB) {&lt;BR /&gt;return "{0:N2} GB" -f ($bytes / 1GB)&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;return "{0:N2} TB" -f ($bytes / 1TB)&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;# Change the unit of the Total field&lt;BR /&gt;$snapshots | ForEach-Object {&lt;BR /&gt;$_ | Add-Member -MemberType NoteProperty -Name "Total " -Value (Convert-Bytes $_.Total) -Force&lt;BR /&gt;$_&lt;BR /&gt;} | Select-Object Name, Volume, Created, "Total "&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 08:13:20 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/Ontap-commands-run-from-Powershell/m-p/457098#M7015</guid>
      <dc:creator>Ashun</dc:creator>
      <dc:date>2024-12-05T08:13:20Z</dc:date>
    </item>
  </channel>
</rss>

