I have 59 Resource Groups and need to change the email notification settings on all of them (specifically the EmailTo field). I am looking in PowerShell and found the commands Set-SmProtectResource and Set-SmResourceGroup, but neither command (from what I can tell) lets you edit the EmailTo field, which is the one I need to change on all 59 groups. Obviously I'm changing the global setting too, but (if I understand correctly) that only affects the next resource groups I create.
Am I missing something in these two commands that would allow me to do what I need to do? Would love any tips or suggestions! Thank you.
You should be able to perform the task using the command Set-SmProtectResource and Set-SmResourceGroup by using the -EnableEmail parameter ( no value need to be added; you will be prompted to enter the settings once you hit Enter).
Below is an example of what to expect when running the command:
To see the examples, type: "get-help Set-SmResourceGroup -examples". For more information, type: "get-help Set-SmResourceGroup -detailed". For technical information, type: "get-help Set-SmResourceGroup -full".