Skip to content

Commit 5a4440c

Browse files
authored
Update Set-CsPhoneNumberAssignment.md
1 parent 2836049 commit 5a4440c

File tree

1 file changed

+39
-13
lines changed

1 file changed

+39
-13
lines changed

teams/teams-ps/teams/Set-CsPhoneNumberAssignment.md

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,15 @@ This cmdlet will assign a phone number to a user or a resource account (online a
1717

1818
## SYNTAX
1919

20-
### Assignment (Default)
20+
### LocationUpdate (Default)
2121
```powershell
22-
Set-CsPhoneNumberAssignment -Identity <String> -PhoneNumber <String> -PhoneNumberType <String> [-LocationId <String>] [<CommonParameters>]
22+
Set-CsPhoneNumberAssignment -PhoneNumber <string> -LocationId <string> [<CommonParameters>]
23+
```
24+
25+
### Assignment
26+
```powershell
27+
Set-CsPhoneNumberAssignment -Identity <String> -PhoneNumber <String> -PhoneNumberType <String>
28+
[-LocationId <String>] [-AssignmentCategory <string>] [<CommonParameters>]
2329
```
2430

2531
### Attribute
@@ -30,8 +36,7 @@ Set-CsPhoneNumberAssignment -Identity <String> -EnterpriseVoiceEnabled <Boolean>
3036
## DESCRIPTION
3137
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.
3238

33-
You can also assign a location to a phone number when you assign the phone number to a user.
34-
39+
You can also assign a location to a phone number.
3540

3641
To remove a phone number from a user or resource account, use the [Remove-CsPhoneNumberAssignment](Remove-CsPhoneNumberAssignment.md) cmdlet.
3742

@@ -93,9 +98,30 @@ foreach ($No in $Numbers) {
9398
```
9499
This example shows how to change the location for unassigned Calling Plan subscriber phone numbers by looping through all the phone numbers, assigning each phone number temporarily with the new location to a user, and then unassigning the phone number again from the user.
95100

101+
### Example 9
102+
```powershell
103+
$loc=Get-CsOnlineLisLocation -City Toronto
104+
Set-CsPhoneNumberAssignment -PhoneNumber +12065551224 -LocationId $loc.LocationId
105+
```
106+
This example shows how to set the location on a phone number.
96107

97108
## PARAMETERS
98109

110+
### -AssignmentCategory
111+
This parameter is reserved for internal Microsoft use.
112+
113+
```yaml
114+
Type: System.String
115+
Parameter Sets: (Assignment)
116+
Aliases:
117+
Applicable: Microsoft Teams
118+
119+
Required: False
120+
Default value: None
121+
Accept pipeline input: False
122+
Accept wildcard characters: False
123+
```
124+
99125
### -EnterpriseVoiceEnabled
100126
Flag indicating if the user or resource account should be EnterpriseVoiceEnabled.
101127
@@ -107,7 +133,7 @@ Parameter Sets: (Attribute)
107133
Aliases:
108134
Applicable: Microsoft Teams
109135

110-
Required: False
136+
Required: True
111137
Default value: None
112138
Accept pipeline input: False
113139
Accept wildcard characters: False
@@ -129,17 +155,18 @@ Accept wildcard characters: False
129155
```
130156
131157
### -LocationId
132-
The LocationId of the location to assign to the specific user. You can get it using Get-CsOnlineLisLocation.
158+
The LocationId of the location to assign to the specific user. You can get it using Get-CsOnlineLisLocation. You can set the location on both assigned and unassigned
159+
phone numbers.
133160
134161
Removal of location from a phone number is supported for Direct Routing numbers and Operator Connect numbers that are not managed by the Service Desk.
135162
If you want to remove the location, use the string value null for LocationId.
136163
137164
```yaml
138165
Type: System.String
139-
Parameter Sets: (Assignment)
166+
Parameter Sets: (Assignment, LocationUpdate)
140167
Aliases:
141168

142-
Required: False
169+
Required: True
143170
Default value: None
144171
Accept pipeline input: False
145172
Accept wildcard characters: False
@@ -154,10 +181,10 @@ Setting a phone number will automatically set EnterpriseVoiceEnabled to True.
154181
155182
```yaml
156183
Type: System.String
157-
Parameter Sets: (Assignment)
184+
Parameter Sets: (Assignment, LocationUpdate)
158185
Aliases:
159186

160-
Required: False
187+
Required: True
161188
Default value: None
162189
Accept pipeline input: False
163190
Accept wildcard characters: False
@@ -171,7 +198,7 @@ Type: System.String
171198
Parameter Sets: (Assignment)
172199
Aliases:
173200

174-
Required: False
201+
Required: True
175202
Default value: None
176203
Accept pipeline input: False
177204
Accept wildcard characters: False
@@ -189,7 +216,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
189216
### System.Object
190217
191218
## NOTES
192-
The cmdlet is available in Teams PowerShell module 3.0.0 or later.
219+
The cmdlet is available in Teams PowerShell module 3.0.0 or later. The parameter set LocationUpdate was introduced in Teams PowerShell module 5.3.1-preview.
193220
194221
The cmdlet is only available in commercial and GCC cloud instances.
195222
@@ -198,7 +225,6 @@ If a user or resource account has a phone number set in Active Directory on-prem
198225
The previous command for assigning phone numbers to users Set-CsUser had the parameter HostedVoiceMail. Setting HostedVoiceMail for Microsoft Teams users is no longer
199226
necessary and that is why the parameter is not available on Set-CsPhoneNumberAssignment.
200227
201-
202228
## RELATED LINKS
203229
[Remove-CsPhoneNumberAssignment](Remove-CsPhoneNumberAssignment.md)
204230

0 commit comments

Comments
 (0)