Data Backup and Recovery Discussions

EmailPreference setting

AshV

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

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

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

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"

 

 

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public