{"id":4779,"date":"2022-06-07T08:37:42","date_gmt":"2022-06-07T06:37:42","guid":{"rendered":"https:\/\/www.msb365.blog\/?p=4779"},"modified":"2022-06-07T08:37:42","modified_gmt":"2022-06-07T06:37:42","slug":"powershell-microsoft-teams-voice","status":"publish","type":"post","link":"https:\/\/www.msb365.blog\/?p=4779","title":{"rendered":"PowerShell Tool &#8211; Teams Voice &#8211; BULK handling Voice policies"},"content":{"rendered":"<p>I was looking for an easy way to distribute Teams Voice policies for several users. I came up with the idea of doing this via PowerShell.<\/p>\n<p>&nbsp;<\/p>\n<p>In this article, I describe the functionality of my PowerShell script, which I wrote and made available to all of you on my GitHub repository.<\/p>\n<p>&nbsp;<\/p>\n<p>I hope it helps you and I wish you a lot of fun with it:<\/p>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"301\"><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/001.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-4800\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/001.png\" alt=\"\" width=\"900\" height=\"201\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/001.png 900w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/001-300x67.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/001-768x172.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/001-600x134.png 600w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/a><\/td>\n<td width=\"301\">After the script is started, a first question is asked, asking whether we want to connect to our Microsoft Teams tenant via PowerShell.<\/p>\n<p>&nbsp;<\/p>\n<p>If this connection already exists, we can continue with &#8220;N&#8221;.<\/p>\n<p>&nbsp;<\/p>\n<p>Otherwise, we select the option &#8220;Y&#8221;.<\/td>\n<\/tr>\n<tr>\n<td width=\"301\"><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/003.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-4801\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/003.png\" alt=\"\" width=\"1129\" height=\"356\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/003.png 1129w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/003-300x95.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/003-1024x323.png 1024w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/003-768x242.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/003-600x189.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/003-905x285.png 905w\" sizes=\"(max-width: 1129px) 100vw, 1129px\" \/><\/a><\/td>\n<td width=\"301\">Now we check whether the corresponding PowerShell module is already installed on the current device.<\/p>\n<p>If this is not the case, this script installs the latest version of the Microsoft Teams PowerShell module.<\/td>\n<\/tr>\n<tr>\n<td width=\"301\"><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/002.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-4802\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/002.png\" alt=\"\" width=\"897\" height=\"158\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/002.png 897w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/002-300x53.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/002-768x135.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/002-600x106.png 600w\" sizes=\"(max-width: 897px) 100vw, 897px\" \/><\/a><\/td>\n<td width=\"301\">If the corresponding module is already installed, the script checks whether there is a newer version. If so, it will be installed automatically. If not, the connection is established and the credentials are requested.<\/td>\n<\/tr>\n<tr>\n<td width=\"301\"><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/002-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4803\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/002-1.png\" alt=\"\" width=\"610\" height=\"539\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/002-1.png 610w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/002-1-300x265.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/002-1-600x530.png 600w\" sizes=\"(max-width: 610px) 100vw, 610px\" \/><\/a><\/td>\n<td width=\"301\">The login process also supports accounts with activated multi-factor authenticator.<\/td>\n<\/tr>\n<tr>\n<td width=\"301\"><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/004.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4804\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/004.png\" alt=\"\" width=\"854\" height=\"503\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/004.png 854w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/004-300x177.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/004-768x452.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/004-600x353.png 600w\" sizes=\"(max-width: 854px) 100vw, 854px\" \/><\/a><\/td>\n<td width=\"301\">The next step is to upload the CSV that is needed to set the policy. This is a CSV with the affected users.<\/p>\n<p>&nbsp;<\/p>\n<p>The script also lists what the CSV file must look like so that the script functions correctly.<\/td>\n<\/tr>\n<tr>\n<td width=\"301\"><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/005.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4805\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/005.png\" alt=\"\" width=\"579\" height=\"161\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/005.png 579w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/005-300x83.png 300w\" sizes=\"(max-width: 579px) 100vw, 579px\" \/><\/a><\/td>\n<td width=\"301\">After the successful import, we can check the entries from the CSV again. If they are not correct, we select the option &#8220;N&#8221; to upload another CSV file.<\/p>\n<p>&nbsp;<\/p>\n<p>However, if the information in the CSV file is correct, we can continue with &#8220;Y&#8221;.<\/td>\n<\/tr>\n<tr>\n<td width=\"301\"><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/006.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4806\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/006.png\" alt=\"\" width=\"715\" height=\"45\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/006.png 715w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/006-300x19.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/006-600x38.png 600w\" sizes=\"(max-width: 715px) 100vw, 715px\" \/><\/a><\/td>\n<td width=\"301\">Now we must enter the corresponding voice policy. It is important that the name is spelled correctly.<\/td>\n<\/tr>\n<tr>\n<td width=\"301\"><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/007.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4807\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/007.png\" alt=\"\" width=\"555\" height=\"71\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/007.png 555w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2022\/04\/007-300x38.png 300w\" sizes=\"(max-width: 555px) 100vw, 555px\" \/><\/a><\/td>\n<td width=\"301\">Imletzten Schritt werden nun the work is carried out.<\/p>\n<p>This means that all users from the CSV file are assigned to the defined voice policy.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>As always, this script is available for free to anyone who needs it. You can download it from my GitHub repository and use it.<\/p>\n<p>&nbsp;<\/p>\n<p>Also as always, I assume no responsibility for possible misconfigurations and strongly recommend to use the first run of this script in a LAB or test environment.<\/p>\n<p>&nbsp;<\/p>\n<p>This script can be used and adapted indefinitely, but not sold to third parties.<\/p>\n<p>&nbsp;<\/p>\n<blockquote><p><a href=\"https:\/\/github.com\/MSB365\/Handle-VoicePolicies\/blob\/main\/Handle-VoicePolicies.ps1\" target=\"_blank\" rel=\"noopener\">Link to the Script on GitHub<\/a><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>I was looking for an easy way to distribute Teams Voice policies for several users. I came up with the idea of doing this via PowerShell. &nbsp; In this article, I describe the functionality of my PowerShell script, which I wrote and made available to all of you on my GitHub repository. &nbsp; I hope [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4780,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[1923,15,3],"tags":[],"class_list":["post-4779","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-365","category-ms-teams","category-powershell"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/4779","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4779"}],"version-history":[{"count":2,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/4779\/revisions"}],"predecessor-version":[{"id":4808,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/4779\/revisions\/4808"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/media\/4780"}],"wp:attachment":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}