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
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.
32
38
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.
35
40
36
41
To remove a phone number from a user or resource account, use the [Remove-CsPhoneNumberAssignment](Remove-CsPhoneNumberAssignment.md) cmdlet.
37
42
@@ -93,9 +98,30 @@ foreach ($No in $Numbers) {
93
98
```
94
99
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.
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.
133
160
134
161
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.
135
162
If you want to remove the location, use the string value null for LocationId.
136
163
137
164
```yaml
138
165
Type: System.String
139
-
Parameter Sets: (Assignment)
166
+
Parameter Sets: (Assignment, LocationUpdate)
140
167
Aliases:
141
168
142
-
Required: False
169
+
Required: True
143
170
Default value: None
144
171
Accept pipeline input: False
145
172
Accept wildcard characters: False
@@ -154,10 +181,10 @@ Setting a phone number will automatically set EnterpriseVoiceEnabled to True.
154
181
155
182
```yaml
156
183
Type: System.String
157
-
Parameter Sets: (Assignment)
184
+
Parameter Sets: (Assignment, LocationUpdate)
158
185
Aliases:
159
186
160
-
Required: False
187
+
Required: True
161
188
Default value: None
162
189
Accept pipeline input: False
163
190
Accept wildcard characters: False
@@ -171,7 +198,7 @@ Type: System.String
171
198
Parameter Sets: (Assignment)
172
199
Aliases:
173
200
174
-
Required: False
201
+
Required: True
175
202
Default value: None
176
203
Accept pipeline input: False
177
204
Accept wildcard characters: False
@@ -189,7 +216,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
189
216
### System.Object
190
217
191
218
## 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.
193
220
194
221
The cmdlet is only available in commercial and GCC cloud instances.
195
222
@@ -198,7 +225,6 @@ If a user or resource account has a phone number set in Active Directory on-prem
198
225
The previous command for assigning phone numbers to users Set-CsUser had the parameter HostedVoiceMail. Setting HostedVoiceMail for Microsoft Teams users is no longer
199
226
necessary and that is why the parameter is not available on Set-CsPhoneNumberAssignment.
0 commit comments