Data Backup and Recovery

EmailPreference setting

AshV
2,723 Views

Hi,

 

I'm creating some resource groups using the PowerShell cmdlets but having some trouble with the "EmailPreference" parameter. the documentation says the possible values are "Always, Never, OnError, OnErrororWarning" but whatever value I specify it always sets the value to "Always".

 

Is anybody else seeing the same issue or know if I need to pass it a specific object type rather than a string?

 

 

Thanks

 

Ash

3 REPLIES 3

pranjith
2,686 Views

Below are the email notification related options:

-EnableEmail
-EmailFrom
-EmailTo
-EmailPreference always
-EmailPreference never
-EmailPreference on_error
-EmailPreference ON_ERROR_OR_WARNING
-EnableEmailAttachment
-EmailSubject

 

Which version of snapcenter server you are using?

AshV
2,684 Views

Hi pranjith,

 

I'm using SnapCenter 4.0 P3.

 

I will give it a go using "-EmailPreference ON_ERROR_OR_WARNING".

 

If this works, looks like another error in the documentation. The SC 4.0 cmdlet reference (link) only lists the the possible values as " Always, Never, OnError, OnErrorOrWarning." without the underscores, none of the examples use the -emailpreference parameter either.

 

I will report back after further testing.

AshV
2,669 Views

Hi pranjith

 

From my further testing, if i specify "on_error" or "on_error_or_warning" I get the following errors:

 

Cannot bind parameter 'EmailPreference'. Cannot convert value "on_error_or_warning" to type
"SMCoreContracts.SmEmailNotificationPreference". Error: "Unable to match the identifier name on_error_or_warning to a
valid enumerator name.

 

Or


Cannot bind parameter 'EmailPreference'. Cannot convert value "on_error" to type
"SMCoreContracts.SmEmailNotificationPreference". Error: "Unable to match the identifier name on_error to a valid
enumerator name.

 

If i specify "onerror" or "onerrororwarning" (as per documentation) I do not get an error and the Resrouce Group creates but with the email preference set to "Always"

 

 

Public