<?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: OCUM 7.2 - Powershell Script for Quota Breach Custom Email to Specific Email DL in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/OCUM-7-2-Powershell-Script-for-Quota-Breach-Custom-Email-to-Specific-Email-DL/m-p/135224#M24515</link>
    <description>&lt;P&gt;Running into an issue where there is no sendmail utility pre-built into the OCUM vapp. I verified this by checking in&amp;nbsp;&lt;STRONG&gt;/usr/bin/&amp;nbsp;/usr/sbin &amp;amp; /sbin&lt;/STRONG&gt;&amp;nbsp;directories for anything that had to do with sending mail. Am I under the right impression that we must download such a utility through apt-get? If so what does this do for the suportablity of our OCUM 7.2 vapp?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On a different Note, I am not 100% sure which ARGV is which so I am trying to play around with the sample perl script to make a bit of a map of these ARGV's. These may not work for eveything but this is what I came up with.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ARGV[0] = eventID&lt;BR /&gt;$ARGV[1] = &amp;lt;eventID Results&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ARGV[2] = eventName&lt;BR /&gt;$ARGV[3] = &amp;lt;eventName Results&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ARGV[4] = eventSeverity&lt;BR /&gt;$ARGV[5] = &amp;lt;eventSeverity Results&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ARGV[6] = eventSourceID&lt;BR /&gt;$ARGV[7] = &amp;lt;eventSourceID Results&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ARGV[8] = eventSourceName&lt;BR /&gt;$ARGV[9] = &amp;lt;eventSourceName Results&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ARGV[10] = eventSourceType&lt;BR /&gt;$ARGV[11] = &amp;lt;eventSource Type Results&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ARGV[12] = eventState&lt;BR /&gt;$ARGV[13] = &amp;lt;eventState Results&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ARGV[14] = eventArgs&lt;BR /&gt;$ARGV[15] = &amp;lt;eventArgs Results&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Oct 2017 17:14:34 GMT</pubDate>
    <dc:creator>DevoidB</dc:creator>
    <dc:date>2017-10-13T17:14:34Z</dc:date>
    <item>
      <title>OCUM 7.2 - Powershell Script for Quota Breach Custom Email to Specific Email DL</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/OCUM-7-2-Powershell-Script-for-Quota-Breach-Custom-Email-to-Specific-Email-DL/m-p/135034#M24480</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Description:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Currently customer notification of soft/hard quota breach is a manual process within my company. We recieve an alert to our storage email group (DL) and then follow up by looking up the owning customer to then email them or their email DL ourselve.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to live in a world where this can happen automagically with a bit of setup from either existing tools within OCUM 7.2 or building a custom script in say powershell that I attach to certain groupings of qtree's based on their owners as part of the provisioning process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Background Information:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have reviewed a&amp;nbsp;fair number of documents from here and Cosonok&amp;nbsp;on the rules to OCUM scripting and still cant seem to wrap my head around what a simple OCUM script would look like for any situation let alone my own.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attempted to use the "Quota Email" portion in the settings to manipulate where specifically named qtrees quota breach alerts should be routed but that doesnt seem very scalable for more than a few qtree's. I have landed on scripts as they can be a bit more dynamic and pull information from other parts of my environment. I have chosen powershell as it is what I am most familiar with of the option OCUM presents for its scripts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Qtree: Test1&lt;/P&gt;&lt;P&gt;Event: Soft Limit Breach&lt;/P&gt;&lt;P&gt;Owner: Customer_A@Company_A.com&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Automatic email&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To: Customer_A@Company_A.com&lt;/P&gt;&lt;P&gt;From: Storage Team&lt;/P&gt;&lt;P&gt;Subject:&amp;lt;$Event&amp;gt;&amp;nbsp; &amp;lt;$Quota_Used&amp;gt;&lt;/P&gt;&lt;P&gt;Body:&lt;/P&gt;&lt;P&gt;Hello Customer_A,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;$QTREE&amp;gt; has breached 95% of its maximum capacity &amp;lt;$Quota_Used&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please either free up storage on this share or place a request for more storage.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Storage Team&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;</description>
      <pubDate>Wed, 04 Jun 2025 14:31:03 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/OCUM-7-2-Powershell-Script-for-Quota-Breach-Custom-Email-to-Specific-Email-DL/m-p/135034#M24480</guid>
      <dc:creator>DevoidB</dc:creator>
      <dc:date>2025-06-04T14:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: OCUM 7.2 - Powershell Script for Quota Breach Custom Email to Specific Email DL</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/OCUM-7-2-Powershell-Script-for-Quota-Breach-Custom-Email-to-Specific-Email-DL/m-p/135216#M24511</link>
      <description>&lt;P&gt;I realize now that there are a number of posts on this topic with varying levels of information and relavence. So I will attempt to document my findings as I attempt to solve my own problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So far I have learned that the OCUM virtual appliance does not accept powershell scripts but instead &lt;STRONG&gt;shell &lt;/STRONG&gt;or &lt;STRONG&gt;perl&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as such I have found the following posts helpful in starting to learn about how to create a perl script that works for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Great article for where scripts are placed and how to review how your scripts performed: &lt;A href="https://community.netapp.com/t5/OnCommand-Storage-Management-Software-Discussions/customizing-mails-from-ocum-7-1/m-p/131149#M23751" target="_blank"&gt;https://community.netapp.com/t5/OnCommand-Storage-Management-Software-Discussions/customizing-mails-from-ocum-7-1/m-p/131149#M23751&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basic perl script to start with: &lt;A href="https://community.netapp.com/t5/OnCommand-Storage-Management-Software-Discussions/OnCommand-Unified-Manager-alert-script-integration/td-p/128784" target="_blank"&gt;https://community.netapp.com/t5/OnCommand-Storage-Management-Software-Discussions/OnCommand-Unified-Manager-alert-script-integration/td-p/128784&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;perl basics for sendmail: &lt;A href="https://community.netapp.com/t5/OnCommand-Storage-Management-Software-Discussions/OnCommand-Unified-Manager-alert-script-integration/td-p/128784" target="_blank"&gt;https://community.netapp.com/t5/OnCommand-Storage-Management-Software-Discussions/OnCommand-Unified-Manager-alert-script-integration/td-p/128784&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alot&amp;nbsp;of this info comes from &lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/2305"&gt;@mbeattie&lt;/a&gt;&amp;nbsp;so be sure to thank him if you'd like.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will try and scrape together a rough outline of my perl script in the coming weeks and post what else I come up with.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks all!&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 13:58:28 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/OCUM-7-2-Powershell-Script-for-Quota-Breach-Custom-Email-to-Specific-Email-DL/m-p/135216#M24511</guid>
      <dc:creator>DevoidB</dc:creator>
      <dc:date>2017-10-13T13:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: OCUM 7.2 - Powershell Script for Quota Breach Custom Email to Specific Email DL</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/OCUM-7-2-Powershell-Script-for-Quota-Breach-Custom-Email-to-Specific-Email-DL/m-p/135224#M24515</link>
      <description>&lt;P&gt;Running into an issue where there is no sendmail utility pre-built into the OCUM vapp. I verified this by checking in&amp;nbsp;&lt;STRONG&gt;/usr/bin/&amp;nbsp;/usr/sbin &amp;amp; /sbin&lt;/STRONG&gt;&amp;nbsp;directories for anything that had to do with sending mail. Am I under the right impression that we must download such a utility through apt-get? If so what does this do for the suportablity of our OCUM 7.2 vapp?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On a different Note, I am not 100% sure which ARGV is which so I am trying to play around with the sample perl script to make a bit of a map of these ARGV's. These may not work for eveything but this is what I came up with.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ARGV[0] = eventID&lt;BR /&gt;$ARGV[1] = &amp;lt;eventID Results&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ARGV[2] = eventName&lt;BR /&gt;$ARGV[3] = &amp;lt;eventName Results&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ARGV[4] = eventSeverity&lt;BR /&gt;$ARGV[5] = &amp;lt;eventSeverity Results&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ARGV[6] = eventSourceID&lt;BR /&gt;$ARGV[7] = &amp;lt;eventSourceID Results&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ARGV[8] = eventSourceName&lt;BR /&gt;$ARGV[9] = &amp;lt;eventSourceName Results&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ARGV[10] = eventSourceType&lt;BR /&gt;$ARGV[11] = &amp;lt;eventSource Type Results&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ARGV[12] = eventState&lt;BR /&gt;$ARGV[13] = &amp;lt;eventState Results&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ARGV[14] = eventArgs&lt;BR /&gt;$ARGV[15] = &amp;lt;eventArgs Results&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 17:14:34 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/OCUM-7-2-Powershell-Script-for-Quota-Breach-Custom-Email-to-Specific-Email-DL/m-p/135224#M24515</guid>
      <dc:creator>DevoidB</dc:creator>
      <dc:date>2017-10-13T17:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: OCUM 7.2 - Powershell Script for Quota Breach Custom Email to Specific Email DL</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/OCUM-7-2-Powershell-Script-for-Quota-Breach-Custom-Email-to-Specific-Email-DL/m-p/135275#M24519</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will need to install the binaries. The following KB article describes the process of how to login as the diag user which will enable you to install binaries&lt;/P&gt;&lt;P&gt;(assuming your OCUM vApp has internet access to download the modules)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://kb.netapp.com/support/s/article/ka31A00000012qfQAA/How-to-access-the-OnCommand-Virtual-Machine-DIAG-shell" target="_blank"&gt;https://kb.netapp.com/support/s/article/ka31A00000012qfQAA/How-to-access-the-OnCommand-Virtual-Machine-DIAG-shell&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When logged in as the diag user, the following commands which includes the PERL modules for calling WFA workflows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;sudo cpan App::cpanminus
sudo cpanm REST::Client
sudo cpanm JSON
sudo cpanm MIME::Base64
sudo cpanm Mail::Sendmail&lt;/PRE&gt;&lt;P&gt;Please note that the OCUM vApp is locked down appliance from a support perspective. Any PERL scripts you create or third party binaries that you install would NOT be supported.&lt;/P&gt;&lt;P&gt;I'd recommend either the RHEL or Windows versions of OCUM if you intend on using the script plugin to automate alerts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you do want to use PowerShell and you are using the OCUM vApp then i'd recommend that your PERL script calls a WFA workflow passing the EventID as a single parameter. You can then use WFA to invoke the "event-iter" OCUM ZAPI via PowerShell to enumerate the event information. This would be useful in the instance that you are integrating the OCUM vApp in a Windows environment and need your alert to intergrate with Microsoft Applications that use PowerShell. Also the ARGV variables numbers are not constant (IE the number of Arguements can change depending on the event so specifiying them by number may not provide predictable results).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is an example PERL script that you might find useful in this TR. (See page 22)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.netapp.com/us/media/tr-4585.pdf" target="_blank"&gt;http://www.netapp.com/us/media/tr-4585.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps? Please let me know if you have any questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Sun, 15 Oct 2017 23:36:32 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/OCUM-7-2-Powershell-Script-for-Quota-Breach-Custom-Email-to-Specific-Email-DL/m-p/135275#M24519</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2017-10-15T23:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: OCUM 7.2 - Powershell Script for Quota Breach Custom Email to Specific Email DL</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/OCUM-7-2-Powershell-Script-for-Quota-Breach-Custom-Email-to-Specific-Email-DL/m-p/135276#M24520</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just FYI if you have WFA installed and you want it to connect to OCUM and enumerate the properties of an event by ID then here is the PowerShell code to do it using the OCUM "event-iter" ZAPI...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Param(
   [Parameter(Mandatory=$True, HelpMessage="The IP Address or FQDN of the OCUM server")]   
   [String]$Hostname,
   [Parameter(Mandatory=$True, HelpMessage="The OCUM Event ID number")]
   [Int]$EventId
)
#'------------------------------------------------------------------------------
Function ConvertFrom-UnixTimeStamp{
   [CmdletBinding()]
   Param(
      [Parameter(Position=0,
         Mandatory=$True,
         ValueFromPipeLine=$True,
         ValueFromPipeLineByPropertyName=$True)]
      [String]$Timestamp
   )
   Return (Get-Date($([TimeZone]::CurrentTimeZone.ToLocalTime(([DateTime]'1/1/1970').AddSeconds($Timestamp)))) -uformat "%Y-%m-%d %H:%M:%S");
}#End Function
#'------------------------------------------------------------------------------
Get-WFALogger -Info -Message "Processing OCUM event ID`: $EventID on server`: $Hostname"
$credentials = Get-WfaCredentials -Host $Hostname
$naServer    = New-WfaZapiServer -Host $Hostname -Type DFM -Credentials $credentials
#'------------------------------------------------------------------------------
#'Invoke the "event-iter" ZAPI to enumerate the event information.
#'------------------------------------------------------------------------------
Try{
   $naElement = New-Object NetApp.Manage.naElement("event-iter")
   $naElement.AddNewChild("event-id", $EventID)
   [Xml]$output = $naServer.InvokeElem($naElement)
}Catch{
   Throw $("Failed enumerating OnCommand Unified Manager Events on ""$Hostname"". Error " + $_.Exception.Message)
}
#'------------------------------------------------------------------------------
#'Exit if there are no events matching the event ID 
#'------------------------------------------------------------------------------
If($output.results.'num-records' -eq 0){
   Throw $("There are no events matching ID`: " + $EventID)
}
#'------------------------------------------------------------------------------
#'Display the event information
#'------------------------------------------------------------------------------
Get-WFALogger -Info -Message $("There is " + $output.results.'num-records' + " events match Event ID`: $eventID")
$event = $output.results.'records'.'event-info'
Get-WFALogger -Info -Message $("event-about`:"               + $event.'event-about')
Get-WFALogger -Info -Message $("event-category`:"            + $event.'event-category')
Get-WFALogger -Info -Message $("event-condition`:"           + $event.'event-condition')
Get-WFALogger -Info -Message $("event-id`:"                  + $event.'event-id')
Get-WFALogger -Info -Message $("event-impact-area`:"         + $event.'event-impact-area')
Get-WFALogger -Info -Message $("event-impact-level`:"        + $event.'event-impact-level')
Get-WFALogger -Info -Message $("event-name`:"                + $event.'event-name')
Get-WFALogger -Info -Message $("event-severity`:"            + $event.'event-severity')
Get-WFALogger -Info -Message $("event-source-name`:"         + $event.'event-source-name')
Get-WFALogger -Info -Message $("event-source-resource-key`:" + $event.'event-source-resource-key')
Get-WFALogger -Info -Message $("event-source-type`:"         + $event.'event-source-type')
Get-WFALogger -Info -Message $("event-state`:"               + $event.'event-state')
Get-WFALogger -Info -Message $("event-time`:"                + $event.'event-time')
Get-WFALogger -Info -Message $("event-timestamp`:"           + $(ConvertFrom-UnixTimeStamp($event.'event-time')))
Get-WFALogger -Info -Message $("event-type`:"                + $event.'event-type')
Get-WFALogger -Info -Message "event-arguments`:"
$keyPairs = $event.'event-arguments'
ForEach($keyPair In $keyPairs.'key-value-pair'){
   $argKey   = $keyPair.'key'
   $argValue = $keyPair.'value'
   Get-WFALogger -Info -Message "$argKey = $argValue"
}
#'------------------------------------------------------------------------------ &lt;/PRE&gt;&lt;P&gt;This should help if you need to enumerate the event information and pass it to a windows application via PowerShell.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Sun, 15 Oct 2017 23:51:40 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/OCUM-7-2-Powershell-Script-for-Quota-Breach-Custom-Email-to-Specific-Email-DL/m-p/135276#M24520</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2017-10-15T23:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: OCUM 7.2 - Powershell Script for Quota Breach Custom Email to Specific Email DL</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/OCUM-7-2-Powershell-Script-for-Quota-Breach-Custom-Email-to-Specific-Email-DL/m-p/140784#M25736</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Adding here&amp;nbsp; two PS lines you can use to&amp;nbsp;consume the&amp;nbsp;parameters into a hashtable on Alert-triggered scripts in OCUM (instead of using $args[1], $args[5] etc.)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;#Create hashtable, Get rid of chars that break the script, append any word that start with " -" to a hashtable index with the input following it until the next " -" as a value.
$parms=@{};" "+($args -replace "\]|\[|@"," " -join " ") -split " -"|?{$_}|%{$t=$_ -split " ",2;$parms.($t[0])=$t[1]}

#Run on $parms.eventArgs and append the first word before a "=" as a eventArgs_* index, and as the value any words after it,  until the next word that come before "=".
($parms.eventArgs -split " "|%{if($_ -match "="){".cut."}$_}) -join " " -split ".cut. "|?{$_}|%{$t=$_ -split "=";$parms.("eventArgs_"+$t[0])=$t[1]}  &lt;/PRE&gt;
&lt;P&gt;Exmple of use for sending a custom email and processing it more - avail here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://community.netapp.com/t5/OnCommand-Storage-Management-Software-Discussions/HOW-TO-consume-parameters-from-OCUM-on-a-PowerShell-script-and-generate-a-custom/m-p/140614" target="_blank"&gt;http://community.netapp.com/t5/OnCommand-Storage-Management-Software-Discussions/HOW-TO-consume-parameters-from-OCUM-on-a-PowerShell-script-and-generate-a-custom/m-p/140614&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Gidi&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 20:23:27 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/OCUM-7-2-Powershell-Script-for-Quota-Breach-Custom-Email-to-Specific-Email-DL/m-p/140784#M25736</guid>
      <dc:creator>GidonMarcus</dc:creator>
      <dc:date>2018-06-07T20:23:27Z</dc:date>
    </item>
  </channel>
</rss>

