From 0cd228a9db29be67e7281b40563424504bb56bce Mon Sep 17 00:00:00 2001 From: pavellatif <142821210+pavellatif@users.noreply.github.com> Date: Tue, 5 Aug 2025 17:21:12 -0400 Subject: [PATCH 1/4] Updating syntax and examples for email notifcation during telephone number assignment and unassignment --- .../Get-CsPhoneNumberAssignment.md | 2 +- .../Remove-CsPhoneNumberAssignment.md | 22 ++++++++++++++---- .../Set-CsPhoneNumberAssignment.md | 23 +++++++++++++++++-- 3 files changed, 40 insertions(+), 7 deletions(-) diff --git a/teams/teams-ps/MicrosoftTeams/Get-CsPhoneNumberAssignment.md b/teams/teams-ps/MicrosoftTeams/Get-CsPhoneNumberAssignment.md index 12b29693df..4499f33849 100644 --- a/teams/teams-ps/MicrosoftTeams/Get-CsPhoneNumberAssignment.md +++ b/teams/teams-ps/MicrosoftTeams/Get-CsPhoneNumberAssignment.md @@ -473,7 +473,7 @@ Accept wildcard characters: False > Applicable: Microsoft Teams -This parameter is reserved for internal Microsoft use. +ID of a network site. A network site represents a location where your organization has a physical venue, such as offices, a set of buildings, or a campus. ```yaml Type: System.String diff --git a/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberAssignment.md b/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberAssignment.md index b599742e58..dfe4dbf05a 100644 --- a/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberAssignment.md +++ b/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberAssignment.md @@ -20,13 +20,13 @@ This cmdlet will remove/unassign a phone number from a user or a resource accoun ### RemoveSome (Default) ``` Remove-CsPhoneNumberAssignment -Identity -PhoneNumber -PhoneNumberType - [-HttpPipelinePrepend ] [] + [-HttpPipelinePrepend ] [-Notify] [] ``` ### RemoveAll ``` Remove-CsPhoneNumberAssignment -Identity [-HttpPipelinePrepend ] [-RemoveAll] - [] + [-Notify] [] ``` ## DESCRIPTION @@ -58,13 +58,13 @@ This example removes/unassigns all the telephone number from user2@contoso.com. ### Example 3 ```powershell -Remove-CsPhoneNumberAssignment -Identity user1@contoso.com -PhoneNumber +12065551234 -PhoneNumberType CallingPlan +Remove-CsPhoneNumberAssignment -Identity user1@contoso.com -PhoneNumber +12065551234 -PhoneNumberType CallingPlan -Notify ``` This example removes/unassigns the Microsoft Calling Plan phone number +1 (206) 555-1234 from the user user1@contoso.com and also sends an email notification to the user about the removal of telephone number. ### Example 4 ```powershell -Remove-CsPhoneNumberAssignment -Identity user2@contoso.com -RemoveAll +Remove-CsPhoneNumberAssignment -Identity user2@contoso.com -RemoveAll -Notify ``` This example removes/unassigns all the telephone number from user2@contoso.com and also sends an email notification to the user about the change. @@ -146,6 +146,20 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Notify +Sends a best-effort email notification when a phone number is removed. Failures to send email are not reported. + +```yaml +Type: Switch +Parameter Sets: (RemoveSome, RemoveAll) +Aliases: + +Required: False +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignment.md b/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignment.md index bc75b516d8..904ee00f52 100644 --- a/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignment.md +++ b/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignment.md @@ -39,7 +39,7 @@ Set-CsPhoneNumberAssignment -PhoneNumber [-HttpPipelinePrepend [-LocationId ] [-HttpPipelinePrepend ] -Identity -PhoneNumberType - [-NetworkSiteId ] [-AssignmentCategory ] [-ReverseNumberLookup ] [] + [-NetworkSiteId ] [-AssignmentCategory ] [-ReverseNumberLookup ] [-Notify] [] ``` ### Attribute @@ -48,8 +48,13 @@ Set-CsPhoneNumberAssignment [-HttpPipelinePrepend ] -Identity < -EnterpriseVoiceEnabled [] ``` +### Notify +``` +Set-CsPhoneNumberAssignment -Identity -PhoneNumber -PhoneNumberType -Notify [] +``` + ## DESCRIPTION -This cmdlet assigns a phone number to a user or resource account. When you assign a phone number the EnterpriseVoiceEnabled flag is automatically set to True. +This cmdlet assigns a telephone number to a user or resource account. When you assign a phone number the EnterpriseVoiceEnabled flag is automatically set to True. You can also assign a location to a phone number. @@ -284,6 +289,20 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Notify +Sends an email to Teams phone user about new telephone number assignment. + +```yaml +Type: Switch +Parameter Sets: (Notify) +Aliases: + +Required: False +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -PhoneNumber The phone number to assign to the user or resource account. Supports E.164 format like +12065551234 and non-E.164 format like 12065551234. The phone number can't have "tel:" prefixed. From 1ad028b3d7db8373ef922cbedf2f7918b0a5bac0 Mon Sep 17 00:00:00 2001 From: pavellatif <142821210+pavellatif@users.noreply.github.com> Date: Tue, 5 Aug 2025 17:29:51 -0400 Subject: [PATCH 2/4] Update Set-CsPhoneNumberAssignment.md --- .../teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignment.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignment.md b/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignment.md index 904ee00f52..cd2f63a6fa 100644 --- a/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignment.md +++ b/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignment.md @@ -48,11 +48,6 @@ Set-CsPhoneNumberAssignment [-HttpPipelinePrepend ] -Identity < -EnterpriseVoiceEnabled [] ``` -### Notify -``` -Set-CsPhoneNumberAssignment -Identity -PhoneNumber -PhoneNumberType -Notify [] -``` - ## DESCRIPTION This cmdlet assigns a telephone number to a user or resource account. When you assign a phone number the EnterpriseVoiceEnabled flag is automatically set to True. @@ -294,7 +289,7 @@ Sends an email to Teams phone user about new telephone number assignment. ```yaml Type: Switch -Parameter Sets: (Notify) +Parameter Sets: Assignment Aliases: Required: False From ea43b7ee0b718277b6d64cb1e2fd1d3ffd812412 Mon Sep 17 00:00:00 2001 From: pavellatif <142821210+pavellatif@users.noreply.github.com> Date: Tue, 5 Aug 2025 17:35:11 -0400 Subject: [PATCH 3/4] fixing parameter set and type for -Notify parameter --- .../teams-ps/MicrosoftTeams/Remove-CsPhoneNumberAssignment.md | 4 ++-- teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignment.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberAssignment.md b/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberAssignment.md index dfe4dbf05a..ae124234b8 100644 --- a/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberAssignment.md +++ b/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberAssignment.md @@ -150,8 +150,8 @@ Accept wildcard characters: False Sends a best-effort email notification when a phone number is removed. Failures to send email are not reported. ```yaml -Type: Switch -Parameter Sets: (RemoveSome, RemoveAll) +Type: System.Management.Automation.SwitchParameter +Parameter Sets: RemoveSome, RemoveAll Aliases: Required: False diff --git a/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignment.md b/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignment.md index cd2f63a6fa..56e7b85ea6 100644 --- a/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignment.md +++ b/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignment.md @@ -288,7 +288,7 @@ Accept wildcard characters: False Sends an email to Teams phone user about new telephone number assignment. ```yaml -Type: Switch +Type: System.Management.Automation.SwitchParameter Parameter Sets: Assignment Aliases: From 377142e04a0e1e149e1334d5bb7d1190e43d753c Mon Sep 17 00:00:00 2001 From: pavellatif <142821210+pavellatif@users.noreply.github.com> Date: Tue, 5 Aug 2025 17:43:44 -0400 Subject: [PATCH 4/4] Fixing validation error for Notify parameter set --- .../teams-ps/MicrosoftTeams/Remove-CsPhoneNumberAssignment.md | 3 ++- teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignment.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberAssignment.md b/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberAssignment.md index ae124234b8..35819f80d0 100644 --- a/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberAssignment.md +++ b/teams/teams-ps/MicrosoftTeams/Remove-CsPhoneNumberAssignment.md @@ -151,10 +151,11 @@ Sends a best-effort email notification when a phone number is removed. Failures ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: RemoveSome, RemoveAll +Parameter Sets: (All) Aliases: Required: False +Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignment.md b/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignment.md index 56e7b85ea6..1923a2bfd4 100644 --- a/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignment.md +++ b/teams/teams-ps/MicrosoftTeams/Set-CsPhoneNumberAssignment.md @@ -293,6 +293,7 @@ Parameter Sets: Assignment Aliases: Required: False +Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False