You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stop-Function-Message "Profile $Profile already exists on $instance. Use MailAccountName parameter to add an account to the existing profile."-Continue
123
+
}
124
+
} else {
125
+
# Profile doesn't exist, create it
126
+
if ($Pscmdlet.ShouldProcess($instance,"Creating new db mail profile called $Profile")) {
$profileObj.AddAccount($MailAccountName,$MailAccountPriority) # sequenceNumber correlates to "Priority" when associating a db mail Account to a db mail Profile
132
+
$profileObj.Create()
133
+
if (Test-Bound-ParameterName 'MailAccountName') {
134
+
if (!$MailAccountPriority) {
135
+
$MailAccountPriority=1
136
+
}
137
+
$profileObj.AddAccount($MailAccountName,$MailAccountPriority) # sequenceNumber correlates to "Priority" when associating a db mail Account to a db mail Profile
0 commit comments