Closed qaaditya closed 5 years ago
@qaaditya So, that parameter takes multiple emails as an array, so you can use it like this:
PS C:> Update-AzSqlServerVulnerabilityAssessmentSetting -ResourceGroupName "ResourceGroup01"
-ServerName "Server01"-StorageAccountName "mystorage"
-ScanResultsContainerName "vulnerability-assessment" -RecurringScansInterval Weekly
-EmailSubscriptionAdmins True `
-NotificationEmail "mail1@mail.com" , "mail2@mail.com"
Or like this
$emails = "mail1@mail.com" , "mail2@mail.com"
...
-EmailSubscriptionAdminId $emails
Please let us know if you have some issue after doing this. If not, we'll make sure the documentation is updated.
@qaaditya Closing, as this looks like the solution. If you have any further issues, please feel free to open new issue.
Description
According to the following doc, the command should allow us to add multiple emails to recipient list. But its failing!
https://docs.microsoft.com/en-us/powershell/module/az.sql/update-azsqlservervulnerabilityassessmentsetting?view=azps-2.1.0
PS C:> Update-AzSqlServerVulnerabilityAssessmentSetting
-ResourceGroupName "ResourceGroup01"
-ServerName "Server01"-StorageAccountName "mystorage"
-ScanResultsContainerName "vulnerability-assessment"-RecurringScansInterval Weekly
-EmailSubscriptionAdmins True ` -NotificationEmail {mail1@mail.com , mail2@mail.com}Steps to reproduce
Environment data
Module versions
Debug output
Error output