NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Data Protection

EmailPreference setting

AshV
4,153 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
4,116 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
4,114 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
4,099 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