{"id":1512,"date":"2013-01-29T13:04:49","date_gmt":"2013-01-29T12:04:49","guid":{"rendered":"https:\/\/www.buarotti.ch\/?p=1512"},"modified":"2013-02-05T19:17:21","modified_gmt":"2013-02-05T18:17:21","slug":"change-lync-sip-address","status":"publish","type":"post","link":"https:\/\/www.buarotti.ch\/?p=1512","title":{"rendered":"Change Lync SIP Address"},"content":{"rendered":"<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\r\n## =======================================================================\r\n## Description: MassScript to change SIP Address\r\n## =======================================================================\r\n## Importing PS Modules\r\nImport-Module activedirectory\r\nImport-Module lync\r\n\r\n## Active Directory OU Please Edit here the OU Struture\r\n$ADOU = &quot;OU=Users,OU=XOU,DC=domain,DC=local&quot;\r\n&quot;Script working in this OU Path&quot;\r\n$ADOU\r\n\r\n## Searching OU Users\r\n$OUMember = Get-CSUser -OU $ADOU\r\n\r\nforeach ($member in $OUMember)\r\n{\r\n&quot;-------------------------------------------------------------------------&quot;\r\n&quot;Show old SIP Address for User:&quot;\r\n&#x5B;console]::ForegroundColor = &quot;yellow&quot;\r\n$member.Name\r\n&#x5B;console]::ResetColor()\r\n$member.SipAddress\r\n&quot;&gt;&gt; Changing to this new SIP Address:&quot;\r\n$sipAddress = $member.SipAddress\r\n$sipAddress = $sipAddress.Replace(&quot;@old-domain.com&quot;,&quot;@new-domain.com&quot;)\r\n&#x5B;console]::ForegroundColor = &quot;yellow&quot;\r\n$sipAddress\r\n&#x5B;console]::ResetColor()\r\n## Settings are applied to the UserObject here\r\nSet-CsUser -Identity $member.Identity -SipAddress $sipAddress\r\n&quot;-------------------------------------------------------------------------&quot;\r\n}\r\n&quot;-- Script DONE --&quot;\r\n\r\n\r\n## END OF Script \/ Certificate\r\n\r\n\r\n<\/pre>\n<h3>Related Images:<\/h3>","protected":false},"excerpt":{"rendered":"<p>## ======================================================================= ## Description: MassScript to change SIP Address ## ======================================================================= ## Importing PS Modules Import-Module activedirectory Import-Module lync ## Active Directory OU Please Edit here the OU Struture $ADOU = &quot;OU=Users,OU=XOU,DC=domain,DC=local&quot; &quot;Script working in this OU Path&quot; $ADOU ## Searching OU Users $OUMember = Get-CSUser -OU $ADOU foreach ($member in $OUMember) { &quot;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&quot; &quot;Show [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[58,79,14],"tags":[],"class_list":["post-1512","post","type-post","status-publish","format-standard","hentry","category-active-directory","category-lync-2010","category-powershell"],"_links":{"self":[{"href":"https:\/\/www.buarotti.ch\/index.php?rest_route=\/wp\/v2\/posts\/1512","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.buarotti.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.buarotti.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.buarotti.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.buarotti.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1512"}],"version-history":[{"count":2,"href":"https:\/\/www.buarotti.ch\/index.php?rest_route=\/wp\/v2\/posts\/1512\/revisions"}],"predecessor-version":[{"id":1531,"href":"https:\/\/www.buarotti.ch\/index.php?rest_route=\/wp\/v2\/posts\/1512\/revisions\/1531"}],"wp:attachment":[{"href":"https:\/\/www.buarotti.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.buarotti.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.buarotti.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}