Skip to content

Commit cde6d05

Browse files
authored
adding examples for emailaddresses
Added examples to show how to: 1) add multiple email addresses 2) change primary smtp address 3) remove email address
1 parent 8b826b5 commit cde6d05

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

exchange/exchange-ps/exchange/sharing-and-collaboration/Set-MailPublicFolder.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,26 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
9696

9797
### Example 1
9898
```powershell
99-
Set-MailPublicFolder -Identity [email protected] -PrimarySmtpAddress [email protected]
99+
Set-MailPublicFolder -Identity MyPublicFolder@contoso.onmicrosoft.com -EmailAddresses @{add="MyPublicFolder@contoso.com","MyPublicFolder@fabrikam.com"}
100100
```
101101

102-
This example sets the primary SMTP address of the mail-enabled public folder [email protected] to [email protected].
102+
This example adds secondary email addresses [email protected] & [email protected] to the mail enabled public folder
103+
104+
Ensure the accepted domain is present in the organization before adding email addresses
105+
106+
### Example 2
107+
```powershell
108+
Set-MailPublicFolder -Identity MyPublicFolder -PrimarySmtpAddress [email protected] -EmailAddressPolicyEnabled $false
109+
```
110+
111+
This example sets the primary SMTP address of the mail-enabled public folder [email protected] to [email protected]
112+
113+
### Example 3
114+
```powershell
115+
Set-MailPublicFolder -Identity MyPublicFolder -EmailAddresses @{remove="[email protected]"}
116+
```
117+
118+
This example removes secondary email address [email protected] from the mail enabled public folder
103119

104120
## PARAMETERS
105121

0 commit comments

Comments
 (0)