<?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: Making a WFA Command fail, when an error is detected when Command is run within a WFA Workflow in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Making-a-WFA-Command-fail-when-an-error-is-detected-when-Command-is-run-within-a/m-p/140425#M25645</link>
    <description>&lt;P&gt;&amp;nbsp;-ErrorAction Stop is used frequently in WFA commands to stop the command execution in case of failure.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for e.g.&lt;/P&gt;
&lt;P&gt;# Check if iGroup exists&lt;BR /&gt;Get-NaIgroup -Names $IgroupName -ErrorAction Stop&lt;/P&gt;</description>
    <pubDate>Tue, 22 May 2018 13:22:20 GMT</pubDate>
    <dc:creator>paragp</dc:creator>
    <dc:date>2018-05-22T13:22:20Z</dc:date>
    <item>
      <title>Making a WFA Command fail, when an error is detected when Command is run within a WFA Workflow</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Making-a-WFA-Command-fail-when-an-error-is-detected-when-Command-is-run-within-a/m-p/140011#M25557</link>
      <description>&lt;P&gt;Looking for best/recommended way to get a WFA command to fail, when executed in a workflow, and some part of the PowerShell code within the command errors out. I am using PowerShell in my WFA commands, and I use try/throw/catch setup for issuing commands to a non-netapp storage device, and analyze the return from the storage system, and I have seen times when I get an error, but the WFA command reports back to the calling WFA Workflow, that the command completed succesfully.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am a Powershell novice, so I suspect it's something I'm doing wrong within my PowerShell script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Here is an example output from a WFA command when run within a WFA Workflow:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;15:18:58.019 INFO [IBM Start or Stop vdisk RC Relationship] ### Command 'IBM Start or Stop vdisk RC Relationship' in 'POWER_SHELL' ### &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;15:19:14.457 INFO [IBM Start or Stop vdisk RC Relationship] TRY: srcVdiskName was set by a previous Workflow step to: RSTRATTON_0066, so we will use RSTRATTON_0066, instead of user-inputted RSTRATTON_0066 &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;15:19:14.472 INFO [IBM Start or Stop vdisk RC Relationship] TRY: rcSourceStorwizeSystemLongName was set by a previous Workflow step to: rclinvsvc01.corp.rc.test, so we will use that value &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;15:19:14.863 INFO [IBM Start or Stop vdisk RC Relationship] srcSystemhostkey is now set to: 9e:d5:75:15:74:8b:67:04:85:bf:f5:ec:b2:7d:bb:60&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;15:19:14.894 ERROR [IBM Start or Stop vdisk RC Relationship] The expression after '&amp;amp;' in a pipeline element produced an object that was not valid. It must result in a command name, a script block, or a CommandInfo object.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;15:19:14.910 INFO [IBM Start or Stop vdisk RC Relationship] TRY: rcTargetStorwizeSystemLongName was set by a previous Workflow step to: rclascsvc01.corp.rc.test, so we will use that value&lt;/P&gt;
&lt;P&gt;15:19:14.941 INFO [IBM Start or Stop vdisk RC Relationship] tgtSystemhostkey is now set to: 82:c8:2f:d8:6b:07:5e:37:22:c4:26:95:f4:c8:e2:b1&lt;/P&gt;
&lt;P&gt;15:19:17.207 INFO [IBM Start or Stop vdisk RC Relationship] Credentials successfully provided for 'RC_IBM_Storwize'&lt;/P&gt;
&lt;P&gt;15:19:17.223 INFO [IBM Start or Stop vdisk RC Relationship] Checking the CURRENT state of the RC relationship...&lt;/P&gt;
&lt;P&gt;15:19:17.742 INFO [IBM Start or Stop vdisk RC Relationship] Checking the NEW state of the RC relationship...&lt;/P&gt;
&lt;P&gt;15:19:18.476 INFO [IBM Start or Stop vdisk RC Relationship] Command completed, took 20457 milliseconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 13:45:15 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Making-a-WFA-Command-fail-when-an-error-is-detected-when-Command-is-run-within-a/m-p/140011#M25557</guid>
      <dc:creator>RickStratton</dc:creator>
      <dc:date>2025-06-04T13:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Making a WFA Command fail, when an error is detected when Command is run within a WFA Workflow</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Making-a-WFA-Command-fail-when-an-error-is-detected-when-Command-is-run-within-a/m-p/140425#M25645</link>
      <description>&lt;P&gt;&amp;nbsp;-ErrorAction Stop is used frequently in WFA commands to stop the command execution in case of failure.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for e.g.&lt;/P&gt;
&lt;P&gt;# Check if iGroup exists&lt;BR /&gt;Get-NaIgroup -Names $IgroupName -ErrorAction Stop&lt;/P&gt;</description>
      <pubDate>Tue, 22 May 2018 13:22:20 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Making-a-WFA-Command-fail-when-an-error-is-detected-when-Command-is-run-within-a/m-p/140425#M25645</guid>
      <dc:creator>paragp</dc:creator>
      <dc:date>2018-05-22T13:22:20Z</dc:date>
    </item>
  </channel>
</rss>

