What does the -EA switch represent on Send-MailMessage?

powershell

Solution

`-ea` is parameter alias for `-ErrorAction`. See http://ss64.com/ps/common.html . It's listed in the common parameters in the `Send-MailMessage` documentation.

This shows the options for ErrorAction:

[enum]::getValues([System.Management.Automation.ActionPreference]) | % {"$_ = (" + [int]$_ + ")"}

You can use the string or the number as the parameter value.

SilentlyContinue = (0)
Stop = (1)
Continue = (2)
Inquire = (3)

`Send-MailMessage -EA Inquire` or `Send-MailMessage -EA 3` are both valid.

Problem

For example: Send-MailMessage -To $to -From $sender -subject $subject -SmtpServer $mailserver -Attachments $efile -EA Stop All those switches are documented on http://technet.microsoft.com/en-us/library/dd347693.aspx except the -EA switch. What does this switch do and where can I find documentation on it (and its arguments)?

Original source