Microsoft Virtualization Discussions
I'm having an issue trying to set the autosupport.partner.to with multiple addresses.
I got it to work properly on an older (FAS2050 with OnTap 7.3.7) by doing this:
$partner = get-content C:\scripts\Powershell\content\partners.txt
set-naoption autosupport.partner.to $partner
The partners.txt has 2 email addresses.
However when I try it on my new FAS6240 (OnTap 8.1.2 7mode) I keep getting this error:
Set-NaOption : Cannot convert 'System.Object' to the type 'System.String' required by parameter 'OptionValue'. Specified method is not supported.
At line:1 char:37
+ set-naoption autosupport.partner.to firstname.lastname@example.org, email@example.com
+ CategoryInfo : InvalidArgument: (:) [Set-NaOption], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgument,DataONTAP.PowerShell.SDK.Cmdlets.Options.SetNaOption
See The Solution
i would probably go at it differently. When you read stuff into a file it becomes in array that you would iterate through. This doesn't seem the right case for it
It's easy to do something like
$partners = "firstname.lastname@example.org,email@example.com"
set-naoption autosupport.partner.to $partners
View solution in original post
If I dropped the Variable and just did this:
set-naoption autosupport.partner.to "firstname.lastname@example.org,email@example.com"
I get an error stating that it was unable to set the autosupport.partner.to option, however It works like a champ. The option is set and autosupport messages are going to all recipients.
Thanks for the help!!!!!!!!!!!!
That happens when you call set-naoption autosupport.doit to something too. I think that api has an issue. Just call it with -erroraction silentlycontinue to suppress the error.
Connected by DROID on Verizon Wireless