{"id":5843,"date":"2022-07-13T09:35:01","date_gmt":"2022-07-13T09:35:01","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=5843"},"modified":"2022-07-14T04:46:06","modified_gmt":"2022-07-14T04:46:06","slug":"how-to-assign-polices-in-teams-calling-in-powershell","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/how-to-assign-polices-in-teams-calling-in-powershell","title":{"rendered":"How to Assign Polices and Numbers Teams calling in Powershell"},"content":{"rendered":"<p>Connect-MicrosoftTeams<\/p><p>[pastacode lang=&#8221;powershell&#8221; manual=&#8221;Get-CsOnlineUser%20%7C%20Where-Object%20%7B(%24_.EnterpriseVoiceEnabled%20-eq%20%22True%22)%7D%20%20%7C%20Select%20UserPrincipalName%2CTenantDialPlan%2COnlineVoiceRoutingPolicy%2CTeamsEmergencyCallRoutingPolicy&#8221; message=&#8221;How to check all users&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]<\/p><p>[pastacode lang=&#8221;powershell&#8221; manual=&#8221;Set-CsPhoneNumberAssignment%20-Identity%20adamfowler%40contoso.com%20-PhoneNumber%20%2B61987654321%20-PhoneNumberType%20DirectRouting&#8221; message=&#8221;Assigning Numbers in Powershell&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]<\/p><p>[pastacode lang=&#8221;powershell&#8221; manual=&#8221;Get-CsOnlineUser%20%7C%20Where-Object%20%7B(%24_.EnterpriseVoiceEnabled%20-eq%20%22True%22)%7D%20%20%7C%20Grant-CsTenantDialPlan%20-PolicyName%20%2202%20Local%22%0A%0AGet-CsOnlineUser%20%7C%20Where-Object%20%7B(%24_.EnterpriseVoiceEnabled%20-eq%20%22True%22)%7D%20%20%7C%20Grant-CsOnlineVoiceRoutingPolicy%20-PolicyName%20%22XXXXXX%22%0A%0AGet-CsOnlineUser%20%7C%20Where-Object%20%7B(%24_.EnterpriseVoiceEnabled%20-eq%20%22True%22)%7D%20%20%7C%20Grant-CsTeamsEmergencyCallRoutingPolicy%20-PolicyName%20%22xxxxx.teams.com.au%22%0A&#8221; message=&#8221;How to assign users DialPlan\\VoiceRoutingPolicy and EmergencyCallRoutingPolicy&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/]<\/p>","protected":false},"excerpt":{"rendered":"<p>Connect-MicrosoftTeams[pastacode lang=&#8221;powershell&#8221; manual=&#8221;Get-CsOnlineUser%20%7C%20Where-Object%20%7B(%24_.EnterpriseVoiceEnabled%20-eq%20%22True%22)%7D%20%20%7C%20Select%20UserPrincipalName%2CTenantDialPlan%2COnlineVoiceRoutingPolicy%2CTeamsEmergencyCallRoutingPolicy&#8221; message=&#8221;How to check all users&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/][pastacode lang=&#8221;powershell&#8221; manual=&#8221;Set-CsPhoneNumberAssignment%20-Identity%20adamfowler%40contoso.com%20-PhoneNumber%20%2B61987654321%20-PhoneNumberType%20DirectRouting&#8221; message=&#8221;Assigning Numbers in Powershell&#8221; highlight=&#8221;&#8221; provider=&#8221;manual&#8221;\/][pastacode lang=&#8221;powershell&#8221; manual=&#8221;Get-CsOnlineUser%20%7C%20Where-Object%20%7B(%24_.EnterpriseVoiceEnabled%20-eq%20%22True%22)%7D%20%20%7C%20Grant-CsTenantDialPlan%20-PolicyName%20%2202%20Local%22%0A%0AGet-CsOnlineUser%20%7C%20Where-Object%20%7B(%24_.EnterpriseVoiceEnabled%20-eq%20%22True%22)%7D%20%20%7C%20Grant-CsOnlineVoiceRoutingPolicy%20-PolicyName%20%22XXXXXX%22%0A%0AGet-CsOnlineUser%20%7C%20Where-Object%20%7B(%24_.EnterpriseVoiceEnabled%20-eq%20%22True%22)%7D%20%20%7C%20Grant-CsTeamsEmergencyCallRoutingPolicy%20-PolicyName%20%22xxxxx.teams.com.au%22%0A&#8221; message=&#8221;How to assign users DialPlan\\VoiceRoutingPolicy and EmergencyCallRoutingPolicy&#8221; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5843","post","type-post","status-publish","format-standard","hentry","category-research"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/5843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=5843"}],"version-history":[{"count":5,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/5843\/revisions"}],"predecessor-version":[{"id":6384,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/5843\/revisions\/6384"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=5843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=5843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=5843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}