Skip to content

Commit 3fe8595

Browse files
committed
Update Remove-CsPhoneNumberAssignment.md
Adds a method to send email to end user for telephone number removal
1 parent 1660397 commit 3fe8595

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

teams/teams-ps/teams/Remove-CsPhoneNumberAssignment.md

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ This cmdlet will remove/unassign a phone number from a user or a resource accoun
2020

2121
### RemoveSome (Default)
2222
```powershell
23-
Remove-CsPhoneNumberAssignment -Identity <String> -PhoneNumber <String> -PhoneNumberType <String> [<CommonParameters>]
23+
Remove-CsPhoneNumberAssignment -Identity <String> -PhoneNumber <String> -PhoneNumberType <String> -Notify [<CommonParameters>]
2424
```
2525

2626
### RemoveAll
2727
```powershell
28-
Remove-CsPhoneNumberAssignment -Identity <String> -RemoveAll [<CommonParameters>]
28+
Remove-CsPhoneNumberAssignment -Identity <String> -RemoveAll -Notify [<CommonParameters>]
2929
```
3030

3131
## DESCRIPTION
@@ -34,7 +34,8 @@ This cmdlet removes/unassigns a phone number from a user or resource account. Th
3434
Unassigning a phone number from a user or resource account will automatically set EnterpriseVoiceEnabled to False.
3535

3636
If the cmdlet executes successfully, no result object will be returned. If the cmdlet fails for any reason, a result object will be returned that contains a
37-
Code string parameter and a Message string parameter with additional details of the failure.
37+
Code string parameter and a Message string parameter with additional details of the failure. Email notification to end user is a best effort operation. No error message will be displayed if the email fails to send.
38+
3839

3940
**Note**: In Teams PowerShell Module 4.2.1-preview and later we are changing how the cmdlet reports errors. Instead of using a result object, we will be generating an
4041
exception in case of an error and we will be appending the exception to the $Error automatic variable. The cmdlet will also
@@ -46,13 +47,25 @@ now support the -ErrorAction parameter to control the execution after an error h
4647
```powershell
4748
Remove-CsPhoneNumberAssignment -Identity [email protected] -PhoneNumber +12065551234 -PhoneNumberType CallingPlan
4849
```
49-
This example removes/unassigns the Microsoft Calling Plan phone number +1 (206) 555-1234 from the user [email protected].
50+
This example removes/unassigns the Microsoft Calling Plan telephone number +1 (206) 555-1234 from the user [email protected].
5051

5152
### Example 2
5253
```powershell
5354
Remove-CsPhoneNumberAssignment -Identity [email protected] -RemoveAll
5455
```
55-
This example removes/unassigns the phone number from [email protected].
56+
This example removes/unassigns all the telephone number from [email protected].
57+
58+
### Example 3
59+
```powershell
60+
Remove-CsPhoneNumberAssignment -Identity [email protected] -PhoneNumber +12065551234 -PhoneNumberType CallingPlan -Notify
61+
```
62+
This example removes/unassigns the Microsoft Calling Plan phone number +1 (206) 555-1234 from the user [email protected] and also sends an email notification to the user about the removal of telephone number.
63+
64+
### Example 4
65+
```powershell
66+
Remove-CsPhoneNumberAssignment -Identity [email protected] -RemoveAll -Notify
67+
```
68+
This example removes/unassigns all the telephone number from [email protected] and also sends an email notification to the user about the change.
5669

5770
## PARAMETERS
5871

@@ -113,6 +126,20 @@ Accept pipeline input: False
113126
Accept wildcard characters: False
114127
```
115128
129+
### -Notify
130+
Sends a best-effort email notification when a phone number is removed. Failures to send email are not reported.
131+
132+
```yaml
133+
Type: Switch
134+
Parameter Sets: (RemoveSome, RemoveAll)
135+
Aliases:
136+
137+
Required: False
138+
Default value: None
139+
Accept pipeline input: False
140+
Accept wildcard characters: False
141+
```
142+
116143
### CommonParameters
117144
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
118145

0 commit comments

Comments
 (0)