<?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: How to use Powershell to perform the ontap system shell command? in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/How-to-use-Powershell-to-perform-the-ontap-system-shell-command/m-p/444021#M6746</link>
    <description>&lt;P&gt;Hi Allen,&lt;/P&gt;&lt;P&gt;Here is an example:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;[Array]$command = @("set diag;volume", "show", "-fields", "tiering-minimum-cooling-days")
Try{
   $api = $("&amp;lt;system-cli&amp;gt;&amp;lt;args&amp;gt;&amp;lt;arg&amp;gt;" + ($command -join "&amp;lt;/arg&amp;gt;&amp;lt;arg&amp;gt;") + "&amp;lt;/arg&amp;gt;&amp;lt;/args&amp;gt;&amp;lt;/system-cli&amp;gt;")
   Write-Host $("Executed Command`: " + $([String]::Join(" ", $command)))
   $response = Invoke-NcSystemApi -Request $api -ErrorAction Stop
}Catch{
   Write-Warning -Message $("Failed Executing Command`: " + $([String]::Join(" ", $command))
   Break;
}
$response.results."cli-output"&lt;/LI-CODE&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;/Matt&lt;/P&gt;</description>
    <pubDate>Thu, 04 May 2023 04:52:59 GMT</pubDate>
    <dc:creator>mbeattie</dc:creator>
    <dc:date>2023-05-04T04:52:59Z</dc:date>
    <item>
      <title>How to use Powershell to perform the ontap system shell command?</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/How-to-use-Powershell-to-perform-the-ontap-system-shell-command/m-p/443971#M6740</link>
      <description>&lt;P&gt;In ONTAP Cli ,&lt;/P&gt;&lt;P&gt;we can use diag account to perform the system shell command,&lt;/P&gt;&lt;P&gt;If the powershell can do that?&lt;/P&gt;&lt;P&gt;how to perform the system shell command by powershell tool kit?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 09:49:36 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/How-to-use-Powershell-to-perform-the-ontap-system-shell-command/m-p/443971#M6740</guid>
      <dc:creator>AllenChang</dc:creator>
      <dc:date>2025-06-04T09:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Powershell to perform the ontap system shell command?</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/How-to-use-Powershell-to-perform-the-ontap-system-shell-command/m-p/444021#M6746</link>
      <description>&lt;P&gt;Hi Allen,&lt;/P&gt;&lt;P&gt;Here is an example:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;[Array]$command = @("set diag;volume", "show", "-fields", "tiering-minimum-cooling-days")
Try{
   $api = $("&amp;lt;system-cli&amp;gt;&amp;lt;args&amp;gt;&amp;lt;arg&amp;gt;" + ($command -join "&amp;lt;/arg&amp;gt;&amp;lt;arg&amp;gt;") + "&amp;lt;/arg&amp;gt;&amp;lt;/args&amp;gt;&amp;lt;/system-cli&amp;gt;")
   Write-Host $("Executed Command`: " + $([String]::Join(" ", $command)))
   $response = Invoke-NcSystemApi -Request $api -ErrorAction Stop
}Catch{
   Write-Warning -Message $("Failed Executing Command`: " + $([String]::Join(" ", $command))
   Break;
}
$response.results."cli-output"&lt;/LI-CODE&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2023 04:52:59 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/How-to-use-Powershell-to-perform-the-ontap-system-shell-command/m-p/444021#M6746</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2023-05-04T04:52:59Z</dc:date>
    </item>
  </channel>
</rss>

