Add HPOVSmtpAlertEmailFilter - HewlettPackard/POSH-HPEOneView GitHub Wiki
Add SMPT Email Alert Filter
Add-HPOVSmtpAlertEmailFilter [-Name] <String> [-Emails] <Array>[ [-Filter] <String>][ [-Scope] <Array>][ [-ScopeMatchPreference] <String>][ [-Async] <SwitchParameter>][ [-ApplianceConnection] <Object>] [<CommonParameters>]Add-HPOVSmtpAlertEmailFilter [-RemoteSupportFilter] <SwitchParameter>[ [-Async] <SwitchParameter>][ [-ApplianceConnection] <Object>] [<CommonParameters>]SMTP Email Filters can be created using this CMDLET.
-ApplianceConnection <Object>
Aliases [-Appliance]
Specify one or more HPOneView.Appliance.Connection object(s) or Name property value(s).
Default Value: ${Global:ConnectedSessions} | ? Default
| Aliases | Appliance |
| Required? | false |
| Position? | named |
| Default value | (${Global:ConnectedSessions} | ? Default) |
| Accept pipeline input? | false |
| Accept wildcard characters? | False |
-Async <SwitchParameter>
Use this parameter to immediately return the async task. By default, the Cmdlet will wait for the task to complete.
| Aliases | None |
| Required? | false |
| Position? | named |
| Default value | |
| Accept pipeline input? | false |
| Accept wildcard characters? | False |
-Emails <Array>
Destination EMail address(es).
| Aliases | recipients |
| Required? | true |
| Position? | named |
| Default value | |
| Accept pipeline input? | true (ByValue) |
| Accept wildcard characters? | False |
-Filter <String>
Aliases [-query]
REST API filter specifying the resource category, URI, name, and severity.
Example: CPU status:"warning" or status:"critical"
| Aliases | query |
| Required? | false |
| Position? | named |
| Default value | |
| Accept pipeline input? | false |
| Accept wildcard characters? | False |
-Name <String>
Name of the Filter you are creating.
| Aliases | None |
| Required? | true |
| Position? | named |
| Default value | |
| Accept pipeline input? | false |
| Accept wildcard characters? | False |
-RemoteSupportFilter <SwitchParameter>
Use to create the HPE OneView Remote Support email filter for service events.
| Aliases | None |
| Required? | True |
| Position? | named |
| Default value | |
| Accept pipeline input? | false |
| Accept wildcard characters? | False |
-Scope <Array>
Scope(s) the Filter should apply to. Omitting parameter will apply filter to all defined scopes. Value is an Array of <HPOneView.Appliance.ScopeResource> or <System.String> of 1 or more names of Scopes.
| Aliases | None |
| Required? | false |
| Position? | named |
| Default value | |
| Accept pipeline input? | false |
| Accept wildcard characters? | False |
-ScopeMatchPreference <String>
If providing multiple Scope resources, specify AND or OR to indicate match preference.
| Aliases | None |
| Required? | false |
| Position? | named |
| Default value | OR |
| Accept pipeline input? | false |
| Accept wildcard characters? | False |
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216)
System.Array <Net.Mail.MailAddress>
Array of email address recipient(s).
HPOneView.Appliance.TaskResource {System.Management.Automation.PSCustomObject}
Returns an async task resource to monitor.
-------------------------- EXAMPLE 1 --------------------------Add-HPOVSmtpAlertEmailFilter -Name "Monitor CPU Error and Warning conditions" -query "CPU status:warning or status:critical" -emails [email protected],[email protected]
Set SMTP Alert to notify when system CPU status is either "warning" or "critical", and email 2 addresses.
-------------------------- EXAMPLE 1 --------------------------$Script:NewAlertFilterResults = Add-HPOVSmtpAlertEmailFilter -Name "My Test Filter 3" -Filter "status:critical" -Emails "[email protected]","[email protected]" -Scope "My new Scope","My new Scope2" -Async
Create a new email critical alert for the two scope names, and return the Async Task object without waiting.
Add SMPT Email Alert Filter
Add-HPOVSmtpAlertEmailFilter [-Name] <String> [-Emails] <Array>[ [-Filter] <String>][ [-Scope] <Array>][ [-ScopeMatchPreference] <String>][ [-Async] <SwitchParameter>][ [-ApplianceConnection] <Object>] [<CommonParameters>]SMTP Email Filters can be created using this CMDLET.
-ApplianceConnection <Object>
Aliases [-Appliance]
Specify one or more HPOneView.Appliance.Connection object(s) or Name property value(s).
Default Value: ${Global:ConnectedSessions} | ? Default
| Aliases | Appliance |
| Required? | false |
| Position? | named |
| Default value | (${Global:ConnectedSessions} | ? Default) |
| Accept pipeline input? | false |
| Accept wildcard characters? | False |
-Async <SwitchParameter>
Use this parameter to immediately return the async task. By default, the Cmdlet will wait for the task to complete.
| Aliases | None |
| Required? | false |
| Position? | named |
| Default value | |
| Accept pipeline input? | false |
| Accept wildcard characters? | False |
-Emails <Array>
Destination EMail address(es).
| Aliases | recipients |
| Required? | true |
| Position? | named |
| Default value | |
| Accept pipeline input? | true (ByValue) |
| Accept wildcard characters? | False |
-Filter <String>
Aliases [-query]
REST API filter specifying the resource category, URI, name, and severity.
Example: CPU status:'warning' or status:'critical'
| Aliases | query |
| Required? | false |
| Position? | named |
| Default value | |
| Accept pipeline input? | false |
| Accept wildcard characters? | False |
-Name <String>
Name of the Filter you are creating.
| Aliases | None |
| Required? | true |
| Position? | named |
| Default value | |
| Accept pipeline input? | false |
| Accept wildcard characters? | False |
-Scope <Array>
Scope(s) the Filter should apply to. Omitting parameter will apply filter to all defined scopes. Value is an Array of <HPOneView.Appliance.ScopeResource> or <System.String> of 1 or more names of Scopes.
| Aliases | None |
| Required? | false |
| Position? | named |
| Default value | |
| Accept pipeline input? | false |
| Accept wildcard characters? | False |
-ScopeMatchPreference <String>
If providing multiple Scope resources, specify AND or OR to indicate match preference.
| Aliases | None |
| Required? | false |
| Position? | named |
| Default value | OR |
| Accept pipeline input? | false |
| Accept wildcard characters? | False |
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216)
System.Array <Net.Mail.MailAddress>
Array of email address recipient(s).
HPOneView.Appliance.TaskResource {System.Management.Automation.PSCustomObject}
Returns an async task resource to monitor.
-------------------------- EXAMPLE 1 --------------------------Add-HPOVSmtpAlertEmailFilter -Name 'Monitor CPU Error and Warning conditions' -query 'CPU status:warning or status:critical' -emails [email protected],[email protected]
Set SMTP Alert to notify when system CPU status is either 'warning' or 'critical', and email 2 addresses.
-------------------------- EXAMPLE 1 --------------------------$Script:NewAlertFilterResults = Add-HPOVSmtpAlertEmailFilter -Name 'My Test Filter 3' -Filter 'status:critical' -Emails '[email protected]','[email protected]' -Scope 'My new Scope','My new Scope2' -Async
Create a new email critical alert for the two scope names, and return the Async Task object without waiting.