<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Karsten Palmvig's blog : How To</title><link>http://blogs.technet.com/kpalmvig/archive/tags/How+To/default.aspx</link><description>Tags: How To</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>How To: Connect to MSN Public IM from OCS</title><link>http://blogs.technet.com/kpalmvig/archive/2009/09/23/how-to-connect-to-msn-public-im-from-ocs.aspx</link><pubDate>Wed, 23 Sep 2009 10:20:12 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3282629</guid><dc:creator>kpalmvig</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/kpalmvig/comments/3282629.aspx</comments><wfw:commentRss>http://blogs.technet.com/kpalmvig/commentrss.aspx?PostID=3282629</wfw:commentRss><description>&lt;p&gt;Most customers know what boxes to check on the Access Edge Server to enable federation and Public IM Connectivity (PIC) but many ask what to do next to sign up to the service.&lt;/p&gt;  &lt;p&gt;Signing up is quite easy, you simply need to follow this link:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="https://ocspic.livemeeting.com/" target="_blank"&gt;https://ocspic.livemeeting.com/&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Sign in using a Live ID and check the box to agree that your organization is a Microsoft Volume Licensing customer, then input the Volume License agreement number of your company and follow directions on the site.&lt;/p&gt;  &lt;p&gt;Simple as that, when you know where to go…. :o)&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3282629" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/kpalmvig/archive/tags/How+To/default.aspx">How To</category><category domain="http://blogs.technet.com/kpalmvig/archive/tags/OCS/default.aspx">OCS</category><category domain="http://blogs.technet.com/kpalmvig/archive/tags/PIC/default.aspx">PIC</category></item><item><title>How To: Telephony enabling users - continued</title><link>http://blogs.technet.com/kpalmvig/archive/2009/07/20/how-to-telephony-enabling-users-continued.aspx</link><pubDate>Mon, 20 Jul 2009 19:49:55 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3266439</guid><dc:creator>kpalmvig</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/kpalmvig/comments/3266439.aspx</comments><wfw:commentRss>http://blogs.technet.com/kpalmvig/commentrss.aspx?PostID=3266439</wfw:commentRss><description>&lt;p&gt;It turned out to be significantly easier to find users without an assigned&amp;#160; LineURI than I expected.&amp;#160; Thanks to Nick Smith for pointing me in the right direction when answering something else. :o)&lt;/p&gt;  &lt;p&gt;The Powershell script takes no parameters and will display the primary SIP URI for all OCS enabled users without a phone number (or LineURI). The count displayed at the end is written to the host so it won’t show in the file if you redirect.&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="518"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="516"&gt;         &lt;p&gt;$OCSUsers = Get-WmiObject -Query &amp;quot;Select * from MSFT_SIPESUserSetting where LineURI IS NULL&amp;quot;           &lt;br /&gt;$i=0            &lt;br /&gt;foreach ($OCSUser in $OCSUsers) {            &lt;br /&gt;&amp;#160; $OCSuser.PrimaryURI            &lt;br /&gt;&amp;#160; $i++            &lt;br /&gt;&amp;#160; }            &lt;br /&gt;Write-Host $i OCS enabled users without LineURI&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;The output will be correctly formatted for use with OCSAssignTelUri.wsf&lt;/p&gt;  &lt;p&gt;Happy enabling…&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3266439" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/kpalmvig/archive/tags/How+To/default.aspx">How To</category><category domain="http://blogs.technet.com/kpalmvig/archive/tags/OCS/default.aspx">OCS</category><category domain="http://blogs.technet.com/kpalmvig/archive/tags/Users/default.aspx">Users</category></item><item><title>How To: Generate multiple phone numbers when telephony enabling users</title><link>http://blogs.technet.com/kpalmvig/archive/2009/07/17/how-to-generate-multiple-phone-numbers-when-telephony-enabling-users.aspx</link><pubDate>Fri, 17 Jul 2009 16:52:53 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3265698</guid><dc:creator>kpalmvig</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/kpalmvig/comments/3265698.aspx</comments><wfw:commentRss>http://blogs.technet.com/kpalmvig/commentrss.aspx?PostID=3265698</wfw:commentRss><description>&lt;p&gt;Ever needed to generate a list of 100+ phone numbers for use with e.g. OCSAssignTelUri.wsf? I have but couldn’t be bothered with inventing a new method every time anymore, so I wrote a little ps script:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="539"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="537"&gt;         &lt;p&gt;param ([string] $Series, [string] $Width, [string] $Count)           &lt;br /&gt;if((&amp;quot;-?&amp;quot;,&amp;quot;-help&amp;quot;,&amp;quot;-h&amp;quot;) -contains $args[0]) {            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Write-Host &amp;quot;This script will generate phone numbers based on a number series&amp;quot;            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Write-Host &amp;quot;Example: .\generatephone.ps1 -Series +1-800-555-1299 -Width 3 -Count 10&amp;quot;            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; exit 0             &lt;br /&gt;}            &lt;br /&gt;[int]$Counter = $Series.SubString($Series.Length - $Width, $Width)            &lt;br /&gt;$Base = $Series.Substring(0, $Series.Length - $Width)            &lt;br /&gt;for ($i=1; $i -le $Count; $i++) {            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; [string]$strlen = $Counter            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; [string]$padding = &amp;quot;&amp;quot;            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; for ($x = $strlen.Length; $x -le $Width - 1; $x++) {            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $padding = &amp;quot;0&amp;quot; + $padding            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; $Number = $Base + $padding + $Counter            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Write-Output $Number            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; $Counter++            &lt;br /&gt;}&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;The script will take your base number series, in this case +1-800-555-1299 the width of 3 which allows the script to modify the last 3 digits and finally the count of phone numbers you need.&lt;/p&gt;  &lt;p&gt;Needless to say, there’s no error handling, so if your width goes beyond dashes you get funny results. And if you only allow editing of 2 digits with a count of 100+ – well, you do the math… :o)&lt;/p&gt;  &lt;p&gt;Anywho, just redirect the output to a file with the standard &amp;gt; operator, and Bob’s your uncle. Then you just need a file full of sip:user@domain.com, maybe a fun little project for my summer vacation to extract users without phone numbers…&lt;/p&gt;  &lt;p&gt;Enjoy…&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3265698" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/kpalmvig/archive/tags/How+To/default.aspx">How To</category><category domain="http://blogs.technet.com/kpalmvig/archive/tags/OCS/default.aspx">OCS</category><category domain="http://blogs.technet.com/kpalmvig/archive/tags/Users/default.aspx">Users</category></item><item><title>Windows 7: Minimize Live Messenger to SysTray</title><link>http://blogs.technet.com/kpalmvig/archive/2009/03/24/windows-7-minimize-live-messenger-to-systray.aspx</link><pubDate>Tue, 24 Mar 2009 12:13:01 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3217267</guid><dc:creator>kpalmvig</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/kpalmvig/comments/3217267.aspx</comments><wfw:commentRss>http://blogs.technet.com/kpalmvig/commentrss.aspx?PostID=3217267</wfw:commentRss><description>&lt;p&gt;I know this topic is not Unified Communications related but it’s annoying the heck out of a lot of people so to share mitigating information I’m including it on my blog.&lt;/p&gt;  &lt;p&gt;The problem is that Live Messenger minimizes to the task bar like any other active application and not to SysTray as we are used to.&lt;/p&gt;  &lt;p&gt;The solution is quite simple: Exit Live Messenger completely, set compatibility mode to Vista on msnmsgr.exe and start it again – now homed in SysTray.&lt;/p&gt;  &lt;p&gt;Msnmsgr.exe is located in %ProgramFiles%\Windows Live\Messenger\&lt;/p&gt;  &lt;p&gt;Enjoy…&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3217267" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/kpalmvig/archive/tags/How+To/default.aspx">How To</category><category domain="http://blogs.technet.com/kpalmvig/archive/tags/Win7/default.aspx">Win7</category></item><item><title>How To: Change mailbox quota based on current value</title><link>http://blogs.technet.com/kpalmvig/archive/2008/07/01/how-to-change-mailbox-quota-based-on-current-value.aspx</link><pubDate>Tue, 01 Jul 2008 20:14:08 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3081831</guid><dc:creator>kpalmvig</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/kpalmvig/comments/3081831.aspx</comments><wfw:commentRss>http://blogs.technet.com/kpalmvig/commentrss.aspx?PostID=3081831</wfw:commentRss><description>&lt;p&gt;This turns out to be somewhat tricky unless you experiment quite a lot with the values and operators, therefore I'm posting the quick solution here for those of you that (like me) like to find what you search for... :o)&lt;/p&gt;  &lt;p&gt;If you use the &lt;strong&gt;Get-Mailbox&lt;/strong&gt; cmdlet without parameters you will get all mailboxes listed in a table view like this:&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="490" border="0"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="92"&gt;&lt;font face="Lucida Console"&gt;Name&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="94"&gt;&lt;font face="Lucida Console"&gt;Alias&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="132"&gt;&lt;font face="Lucida Console"&gt;ServerName&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="170"&gt;&lt;font face="Lucida Console"&gt;ProhibitSendQuota&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="91"&gt;&lt;font face="Lucida Console"&gt;-----&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="93"&gt;&lt;font face="Lucida Console"&gt;-----&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="132"&gt;&lt;font face="Lucida Console"&gt;----------&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="170"&gt;&lt;font face="Lucida Console"&gt;-----------------&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="91"&gt;&lt;font face="Lucida Console"&gt;John Doe&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="93"&gt;&lt;font face="Lucida Console"&gt;JohnDoe&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="132"&gt;&lt;font face="Lucida Console"&gt;Server01&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="170"&gt;&lt;font face="Lucida Console"&gt;50MB&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="91"&gt;&lt;font face="Lucida Console"&gt;Jane Doe&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="93"&gt;&lt;font face="Lucida Console"&gt;JaneDoe&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="132"&gt;&lt;font face="Lucida Console"&gt;Server01&lt;/font&gt;&lt;/td&gt;        &lt;td valign="top" width="170"&gt;&lt;font face="Lucida Console"&gt;unlimited&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;So suppose you want to change the ProhibitSendQuota for all users that currently have a quota of 50MB to 100MB; in my mind the straight forward way to find all users with a 50MB quota would be to apply the filter: ProhibitSendQuota -eq 50MB but that will return exactly nothing...&lt;/p&gt;  &lt;p&gt;Instead you have to use sizes like Exchange do (although Get-Mailbox returns the formatted output). So bearing in mind that 50MB in Exchange terms is 50 x 1024 = 51200 the string will look like this:&lt;/p&gt;  &lt;p&gt;&lt;font face="Lucida Console"&gt;&lt;strong&gt;Get-Mailbox&lt;/strong&gt; -Filter { ProhibitSendQuota -like 51200 } | &lt;strong&gt;Set-Mailbox&lt;/strong&gt; -ProhibitSendQuota 100MB -UseDatabaseQuotaDefaults $false&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Notice that you have to use &amp;quot;-like&amp;quot; instead of &amp;quot;-eq&amp;quot; which would be the more logical operator to use in this case. When setting the new size you can use KB, MB, GB, TB as you please...&lt;/p&gt;  &lt;p&gt;The above will look like this in the GUI:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="149" alt="GUI screenshot" src="http://blogs.technet.com/blogfiles/kpalmvig/WindowsLiveWriter/HowToChangemailboxquotabasedoncurrentval_10DEA/image_3.png" width="432" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;Enjoy...&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3081831" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/kpalmvig/archive/tags/How+To/default.aspx">How To</category><category domain="http://blogs.technet.com/kpalmvig/archive/tags/Exchange/default.aspx">Exchange</category></item><item><title>How To: Bulk creation of AD users and Exchange mailboxes</title><link>http://blogs.technet.com/kpalmvig/archive/2008/03/10/how-to-bulk-creation-of-ad-users-and-exchange-mailboxes.aspx</link><pubDate>Tue, 11 Mar 2008 01:28:25 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2985365</guid><dc:creator>kpalmvig</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/kpalmvig/comments/2985365.aspx</comments><wfw:commentRss>http://blogs.technet.com/kpalmvig/commentrss.aspx?PostID=2985365</wfw:commentRss><description>&lt;p&gt;Over the past couple of months I have worked on more than one project where the customer wanted to create a new forest for the new Exchange 2007 installation. Normally you would migrate users from the old domain(s) with ADMT or another product but in these cases brand new user accounts and mailboxes were desired.&lt;/p&gt;  &lt;p&gt;So how do you create all your new users the easiest way? Well, with Exchange Management Shell of course! :o)&lt;/p&gt;  &lt;p&gt;First you have to export existing users. Here I will use a Windows Server 2003 domain as an example source domain. I recommend using &lt;a href="http://technet2.microsoft.com/windowsserver/en/library/1050686f-3464-41af-b7e4-016ab0c4db261033.mspx?mfr=true" target="_blank"&gt;CSVDE&lt;/a&gt; for the export as it will give you a comma delimited file that is easy to manipulate in Excel. &lt;/p&gt;  &lt;p&gt;&lt;font color="#008000"&gt;The more time you spend cleaning up your data in Excel, the more time you save later by not having to re-iterate the whole process. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Example: &lt;strong&gt;csvde &lt;/strong&gt;-d &amp;quot;ou=Domain Users,dc=contoso,dc=com&amp;quot; -f DomainUsersOU.txt&lt;/p&gt;  &lt;p&gt;Make sure your output file has the &amp;quot;.txt&amp;quot; extension for Excel to be able to detect the content properly.&lt;/p&gt;  &lt;p&gt;Now you fire up Excel, open the file and let Excel do its magic after you select comma delimited format.&lt;/p&gt;  &lt;p&gt;Select the columns and rows you want to use for the import and get rid of the rest, the example below uses just the most basic fields - you may need to import more fields; e.g. if you have OCS and phone integration you would want to keep the msRTCSIP-Line and msRTCSIP-PrimaryUserAddress fields.&lt;/p&gt;  &lt;p&gt;In this example a bunch of random passwords are created and saved in a column called &amp;quot;Password&amp;quot;.&lt;/p&gt;  &lt;p&gt;Save the file as tab delimited (this will save you a headache later) and use the following script to convert the file to a proper comma delimited format (borrowed from &lt;a href="http://msgoodies.blogspot.com/2007/04/powershell-convert-tsvtocsv.html" target="_blank"&gt;msgoodies&lt;/a&gt;):&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="479" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="477"&gt;         &lt;p&gt;$v=new-object system.text.stringBuilder 1000           &lt;br /&gt;$input | % {            &lt;br /&gt; $v.length=0 # empty sb            &lt;br /&gt; $e=$_.split(&amp;quot;`t&amp;quot;)            &lt;br /&gt; $e | % {            &lt;br /&gt;&amp;#160; $null=$v.append(&amp;quot;,&amp;quot;)            &lt;br /&gt;&amp;#160; if ($_[0] -eq &amp;quot;`&amp;quot;&amp;quot; -and $_.endswith(&amp;quot;`&amp;quot;&amp;quot;)) {            &lt;br /&gt;&amp;#160;&amp;#160; # already quoted - strip them            &lt;br /&gt;&amp;#160;&amp;#160; $_=$_.substring(1,$_.length-2)            &lt;br /&gt;&amp;#160; }            &lt;br /&gt;&amp;#160; $null=$v.append('&amp;quot;'+$_.replace('&amp;quot;','&amp;quot;&amp;quot;')+'&amp;quot;')            &lt;br /&gt; }            &lt;br /&gt; $v.tostring().substring(1)            &lt;br /&gt;}&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Save the script file as: Convert-TsvToCsv.ps1 (or really, whatever you like)&lt;/p&gt;  &lt;p&gt;Syntax for converting: &amp;quot;&lt;strong&gt;type&lt;/strong&gt; tabfile.txt | &lt;strong&gt;.\Convert-TsvToCsv.ps1&lt;/strong&gt; &amp;gt;csvfile.txt&amp;quot;&lt;/p&gt;  &lt;p&gt;Now the fun begins!&lt;/p&gt;  &lt;p&gt;Import the file into a variable by running the Import-Csv cmdlet:&lt;/p&gt;  &lt;p&gt;$users = &lt;strong&gt;Import-Csv&lt;/strong&gt; csvfile.txt&lt;/p&gt;  &lt;p&gt;This will give you a chance to verify the format of the data one last time by simply typing &amp;quot;$users&amp;quot; in the Exchange Management Shell.&lt;/p&gt;  &lt;p&gt;Now we need to parse the array of users by using a ForEach loop:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;ForEach&lt;/strong&gt; ($user in $users) { $pass = &lt;strong&gt;ConvertTo-SecureString&lt;/strong&gt; $user.Password -asPlainText -Force; &lt;strong&gt;New-Mailbox&lt;/strong&gt; -UserPrincipalName $user.userPrincipalName -Alias $user.sAMAccountName -Database $user.homeMDB -Name $user.sAMAccountName -DomainController dc01.contoso.com -OrganizationalUnit $user.ou -FirstName $user.givenName -LastName $user.sn -DisplayName $user.displayName -Password $pass -ResetPasswordOnNextLogon $true -WhatIf }&lt;/p&gt;  &lt;p&gt;The first part of the command converts the included password to a SecureString format to be able to script the input of the password. The second part creates a new AD domain account and an Exchange 2007 mailbox.&lt;/p&gt;  &lt;p&gt;Fields like &amp;quot;homeMDB&amp;quot; will of course need to be manipulated in Excel after the original export. If you use organization wide unique names for databases, you only need to specify the database name here.&lt;/p&gt;  &lt;p&gt;The &amp;quot;ou&amp;quot; will not always be populated correctly when exporting but can be derived from the &amp;quot;DN&amp;quot; field by a simple Excel macro. That is, if you want the same OU structure in the destination domain.&lt;/p&gt;  &lt;p&gt;After you have tested the script with the &amp;quot;-WhatIf&amp;quot; statement to verify success you can go ahead and remove the &amp;quot;-WhatIf&amp;quot; and create the users in your domain...&lt;/p&gt;  &lt;p&gt;Hopefully this will save you some time.... Enjoy!&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2985365" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/kpalmvig/archive/tags/How+To/default.aspx">How To</category><category domain="http://blogs.technet.com/kpalmvig/archive/tags/AD/default.aspx">AD</category><category domain="http://blogs.technet.com/kpalmvig/archive/tags/Users/default.aspx">Users</category><category domain="http://blogs.technet.com/kpalmvig/archive/tags/Exchange/default.aspx">Exchange</category></item><item><title>How To: Build an OCS and UM lab with phone integration</title><link>http://blogs.technet.com/kpalmvig/archive/2008/01/03/how-to-build-an-ocs-and-um-lab-with-phone-integration.aspx</link><pubDate>Thu, 03 Jan 2008 14:56:40 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2706016</guid><dc:creator>kpalmvig</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.technet.com/kpalmvig/comments/2706016.aspx</comments><wfw:commentRss>http://blogs.technet.com/kpalmvig/commentrss.aspx?PostID=2706016</wfw:commentRss><description>&lt;p&gt;To quickly set up a lab for testing phone integration you need at least three servers for OCS and Exchange roles. One additional server is needed for Active Directory and Certificate Authority.&lt;/p&gt;  &lt;p&gt;I would recommend using a 64-bit machine installed with Windows Server 2003 x64 and Virtual Server 2005 R2. Virtual Server can then host the Office Communication Server 2007 roles and even the Domain Controller if needed. Exchange Server 2007 will be installed on the host machine (all roles for this setup can co-exist on the same machine).&lt;/p&gt;  &lt;p&gt;Then you need a VOIP/SIP gateway, for this documentation I'll be referring to the Audiocodes MP-114 FXO SIP Gateway but other products with same capabilities exist. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The Audiocodes MP-114 product is not supported for enterprise deployment of OCS, the setup described here is only for lab use. Virtualization of OCS2007 is not supported in a production environment.&lt;/p&gt;  &lt;p&gt;For this simple lab your existing desk phone will be handled by whatever PBX you have installed and the SIP gateway will &amp;quot;listen in&amp;quot; on a second line that the PBX has been configured to use for the same extension as your desk phone. You can also use a completely different extension for testing.&lt;/p&gt;  &lt;p&gt;A very high level diagram of the communication flow in the lab set up will look like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kpalmvig/WindowsLiveWriter/HowToBuildanOCSandUMlabwithphoneintegrat_14926/OCS-UM-flow_2.jpg" target="_blank"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="105" alt="OCS-UM-flow" src="http://blogs.technet.com/blogfiles/kpalmvig/WindowsLiveWriter/HowToBuildanOCSandUMlabwithphoneintegrat_14926/OCS-UM-flow_thumb.jpg" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h4&gt;Configuring the SIP gateway&lt;/h4&gt;  &lt;p&gt;First you need to download the OCS compatible .ini file from &lt;a href="http://audiocodes.com/content.aspx?voip=2823" target="_blank"&gt;AudioCodes' web site&lt;/a&gt; - you need the &amp;quot;FXO (One-to-One option)&amp;quot; download for this setup.&lt;/p&gt;  &lt;p&gt;Follow the quick guide available on the same page for basic setup of the MP-114. (Default IP address of the device may be 10.1.10.10 - it was in my case).&lt;/p&gt;  &lt;p&gt;When configuring endpoint phone number, use your full phone number.&lt;/p&gt;  &lt;p&gt;I prefer to do as little phone number manipulation as possible in the MP-114 but you need to convert the incoming phone extension into a full E.164 compliant number so it will match your phone number in OCS.&lt;/p&gt;  &lt;p&gt;It is by far the easiest to do all your phone number normalization in OCS and just pass on the &amp;quot;finished&amp;quot; number to the MP-114, more about this in the Mediation Server section.&lt;/p&gt;  &lt;p&gt;Just let the MP-114 route all inbound calls to your number.&lt;/p&gt;  &lt;p&gt;As this is a test setup you may want your desk phone to ring a couple of times before your lab environment kicks in, this can be done by configuring the FXONumberOfRings under http://mp-114/AdminPage to the number of rings you want before the MP-114 reacts.&lt;/p&gt;  &lt;p&gt;A good way to see what happens when inbound calls are made is to monitor the ports on the main page of the administration interface. Click the port (Port 3 in this case as only FXO ports should be connected to a PBX), select port settings and then SIP. This way you can see if inbound calls are translated and routed properly (fields are only populated during a call).&lt;/p&gt;  &lt;p&gt;The MP-114 will allow you to connect an analog phone directly and use that for dialing in but it makes more sense to connect it to a PBX for testing.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h4&gt;Install Mediation Server&lt;/h4&gt;  &lt;p&gt;Essential reading before starting is the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=24e72dac-2b26-4f43-bba2-60488f2aca8d&amp;amp;displaylang=en" target="_blank"&gt;Enterprise Voice Planning and Deployment Guide&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I assume that you already have an OCS2007 front end server running with client connectivity so just install the Mediation Server role on a different server using the OCS2007 Deployment Wizard.&lt;/p&gt;  &lt;p&gt;Configure listening IP address for both Communication Server and Gateway to the servers address. Leave location profile as &amp;quot;(None)&amp;quot; - we'll configure that later.&lt;/p&gt;  &lt;p&gt;Next Hop Connections: FQDN of your front end server and IP address of the SIP gateway (MP-114 in this scenario).&lt;/p&gt;  &lt;p&gt;Create a certificate for the the server from the same CA as you did for the front end server.&lt;/p&gt;  &lt;p&gt;Assign a Line URI telephone number to your users in E.164 format through the OCS2007 console or ADUC; select &amp;quot;Enable Enterprise Voice&amp;quot; and input the full phone number as: &amp;quot;tel:+4544890100&amp;quot; (this is an example number, use one that fits into your numbering scheme).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kpalmvig/WindowsLiveWriter/HowToBuildanOCSandUMlabwithphoneintegrat_14926/UserOptions_2.jpg" target="_blank"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="UserOptions" src="http://blogs.technet.com/blogfiles/kpalmvig/WindowsLiveWriter/HowToBuildanOCSandUMlabwithphoneintegrat_14926/UserOptions_thumb.jpg" width="195" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h4&gt;Configuring Exchange UM&lt;/h4&gt;  &lt;p&gt;Under Organization Configuration\Unified Messaging:&lt;/p&gt;  &lt;p&gt;Create a UM Dial Plan (Shell cmdlets are documented in the deployment guide so I'll show the GUI):&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kpalmvig/WindowsLiveWriter/HowToBuildanOCSandUMlabwithphoneintegrat_14926/UM-dial-plan_4.jpg" target="_blank"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="213" alt="UM-dial-plan" src="http://blogs.technet.com/blogfiles/kpalmvig/WindowsLiveWriter/HowToBuildanOCSandUMlabwithphoneintegrat_14926/UM-dial-plan_thumb_1.jpg" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Give the dial plan a name and use as many digits for extension as you desire.&lt;/p&gt;  &lt;p&gt;Add the dial plan to the UM server object under Server Configuration\Unified Messaging.&lt;/p&gt;  &lt;p&gt;Create a new UM Auto Attendant; simply name it AutoAttendant and select the dial plan you created before. Associate an extension number with your Auto Attendant that doesn't conflict with other numbers. Make sure you enable and speech enable the Auto Attendant by checking the two checkboxes at the bottom.&lt;/p&gt;  &lt;p&gt;Run the ExchUCUtil.ps1 script.&lt;/p&gt;  &lt;p&gt;This will set permissions on the Exchange Org and UM containers and add the OCS front end server as IP gateway for the UM server.&lt;/p&gt;  &lt;p&gt;Don't forget to enable users for UM... ;o)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h4&gt;Configure Mediation Server&lt;/h4&gt;  &lt;p&gt;Run the Exchange UM Integration Utility (found under: C:\Program Files\Microsoft Office Communications Server 2007\Server\Support\OcsUMUtil.exe on your front end server)&lt;/p&gt;  &lt;p&gt;Press &amp;quot;Load Data&amp;quot;&lt;/p&gt;  &lt;p&gt;If the list shows your Exchange UM dial plan, press &amp;quot;Add&amp;quot; and select phone number defined in Exchange UM under phone number and &amp;quot;Auto-Attendant&amp;quot; under Contact Type.&lt;/p&gt;  &lt;p&gt;Press OK&lt;/p&gt;  &lt;p&gt;The tool will say that no matching location profile exists so lets go ahead and create one now:&lt;/p&gt;  &lt;p&gt;Right click the forest name in the OCS2007 console, select Properties; Voice Properties&lt;/p&gt;  &lt;p&gt;Add a new profile, using the name OcsUMUtil found.&lt;/p&gt;  &lt;p&gt;Add as many Normalization Rules to the profile as you need. This is very well documented in the deployment guide but a fast one to get you going:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Name: Local extension&lt;/p&gt;    &lt;p&gt;Phone pattern regular expression: ^([1-9]\d{3})$&lt;/p&gt;    &lt;p&gt;Translation pattern regular expression: +454489$1&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The pattern regular expression will look for any 4 digit number starting with 1-9 and pass it on to the translation as variable $1 - the translation will prefix it with +454489 (so it conforms to E.164 numbering this way OCS can match a 4 digit local extension to the full number you have configured on your OCS/UM users).&lt;/p&gt;  &lt;p&gt;Phone Usages and Policies are not very important for this small lab setup just assign &amp;quot;Default Usage&amp;quot; to &amp;quot;Default Policy&amp;quot;.&lt;/p&gt;  &lt;p&gt;In Routes, create a new route called &amp;quot;Default Route&amp;quot;, set the Target regular expression to &amp;quot;.*&amp;quot; to let all numbers that does not match an internal user to be routed. (You can set it to &amp;quot;^\+45&amp;quot; to only allow national calls, other country codes will then fail to route).&lt;/p&gt;  &lt;p&gt;Set the gateway address to your Mediation Server and select &amp;quot;Default Usage&amp;quot; under Phone usages.&lt;/p&gt;  &lt;p&gt;Assign the Location Profile to the Mediation Server object in the OCS2007 console.&lt;/p&gt;  &lt;p&gt;A very good tool to verify that your call routing is working is the Enterprise Voice Route Helper available for download in the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=b9bf4f71-fb0b-4de9-962f-c56b70a8aecd&amp;amp;displaylang=en" target="_blank"&gt;Office Communications Server 2007 Resource Kit Tools&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Your OC client should look like this if phone integration is configured properly:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/kpalmvig/WindowsLiveWriter/HowToBuildanOCSandUMlabwithphoneintegrat_14926/OC-VoiceMail_2.jpg" target="_blank"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="188" alt="OC-VoiceMail" src="http://blogs.technet.com/blogfiles/kpalmvig/WindowsLiveWriter/HowToBuildanOCSandUMlabwithphoneintegrat_14926/OC-VoiceMail_thumb.jpg" width="240" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Enjoy...&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2706016" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/kpalmvig/archive/tags/UM/default.aspx">UM</category><category domain="http://blogs.technet.com/kpalmvig/archive/tags/How+To/default.aspx">How To</category><category domain="http://blogs.technet.com/kpalmvig/archive/tags/SIP/default.aspx">SIP</category><category domain="http://blogs.technet.com/kpalmvig/archive/tags/OCS/default.aspx">OCS</category></item></channel></rss>