<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>codesalot.com</title>
	<atom:link href="http://www.codesalot.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codesalot.com</link>
	<description>Thoughts, ponderings and technical solutions, tips and tricks about Unified Communications and Video Conferencing</description>
	<lastBuildDate>Tue, 24 Jan 2012 21:48:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Adding external contacts to the #Lync addressbook</title>
		<link>http://www.codesalot.com/2012/adding-external-contacts-to-the-lync-addressbook/</link>
		<comments>http://www.codesalot.com/2012/adding-external-contacts-to-the-lync-addressbook/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 12:56:24 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Unified Communications]]></category>
		<category><![CDATA[Lync]]></category>
		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://www.codesalot.com/?p=364</guid>
		<description><![CDATA[There are some scenarios where it would be nice to be able to add external contacts to the Lync addresse so that they are searchable for everyone in the organization. Or at least external in the sence that the contact has a sip domain that isn&#8217;t supported in the Lync topology. One such scenario could [...]]]></description>
			<content:encoded><![CDATA[<p>There are some scenarios where it would be nice to be able to add external contacts to the Lync addresse so that they are searchable for everyone in the organization. Or at least external in the sence that the contact has a sip domain that isn&#8217;t supported in the Lync topology.</p>
<p>One such scenario could be an integration with an internal Cisco Telepresence solution.</p>
<p>The way to solve this is to add a contact object to AD that has the msRTCSIP-PrimaryUserAddress attribute populated, and the contact should be added to the address book on the next <a href="http://blog.schertz.name/2010/09/updating-the-lync-2010-address-book/" target="_blank">synchronization pass</a>. I&#8217;ve made a script to create this kind of object:</p>
<p>Note that displayName is not required, but if you don&#8217;t add it the contact will only display the sipadress in the Lync client. I guess it&#8217;s also possible to append other AD attributes to the user such as telephoneNumber.</p>
<p>I got a question about telephoneNumber as well, so I&#8217;ve added it as an optional parameter in the script.</p>
<pre class="brush: powershell; title: ; notranslate">

#####################################################################################
# New-SipContact.ps1
#
# Creates a contact object in AD that will be included in Lync/OCS address books.
#
#
# Passing parameters:
# .\New-SipContact.ps1 -cn &quot;John Spencer&quot; -path &quot;OU=SIPContacts,DC=contoso,DC=com&quot; -sipaddress &quot;john.spencer@litwareinc.com&quot; -displayname &quot;John Displayname Spencer&quot;
#
# Written by Tom-Inge Larsen (http://www.codesalot.com)
#
#####################################################################################
param($cn,$OUpath,$sipAddress,$displayName=&quot;&quot;,$telephoneNumber=&quot;&quot;)

$fullpath= &quot;LDAP://&quot; + $OUpath
$SIPContactOU = [ADSI]$fullpath

$SIPContact = $SIPContactOU.create(&quot;contact&quot;, &quot;cn=&quot; + $cn)
$SIPContact.Put(&quot;Description&quot;,&quot;SIP Contact Object&quot;)
$SIPContact.Put(&quot;msRTCSIP-PrimaryUserAddress&quot;, &quot;sip:&quot; + $sipAddress)
if ($displayName -ne &quot;&quot;) {
 $SIPContact.Put(&quot;displayName&quot;, $displayName)
}
$SIPContact.Put(&quot;msRTCSIP-PrimaryUserAddress&quot;, &quot;sip:&quot; + $sipAddress)
if ($telephoneNumber -ne &quot;&quot;) {
 $SIPContact.Put(&quot;telephoneNumber&quot;, $telephoneNumber)
}
$SIPContact.setInfo()
</pre>
<p>I&#8217;ve also created one to bulk create contacts from a .csv file</p>
<pre class="brush: powershell; title: ; notranslate">

#####################################################################################
# New-SipContactBulk.ps1
#
# Creates a contact object in AD that will be included in Lync/OCS address books.
#
#
# Passing parameters:
# .\New-SipContactBulk.ps1 -OUpath &quot;OU=SIPContacts,DC=contoso,DC=com&quot; -csv &quot;c:\newcontacts.csv&quot;
#
#
# Written by Tom-Inge Larsen (http://www.codesalot.com)
#
#####################################################################################
param($OUpath,$csv)

$fullpath= &quot;LDAP://&quot; + $OUpath
$SIPContactOU = [ADSI]$fullpath

$contacts = Import-Csv -path $csv -header &quot;cn&quot;,&quot;displayName&quot;,&quot;sipaddress&quot;

foreach ($contact in $contacts) {

$SIPContact = $SIPContactOU.create(&quot;contact&quot;, &quot;cn=&quot; + $contact.cn)
 $SIPContact.Put(&quot;Description&quot;,&quot;SIP Contact Object&quot;)
 $SIPContact.Put(&quot;msRTCSIP-PrimaryUserAddress&quot;, &quot;sip:&quot; + $contact.sipaddress)
 if ($contact.displayname -ne &quot;&quot;) {
 $SIPContact.Put(&quot;displayName&quot;, $contact.displayName)
 }
 $SIPContact.setInfo()
}
</pre>
<p>The example csv file is here: <a href="http://www.codesalot.com/wp-content/uploads/2012/01/newcontacts.csv">newcontacts.csv</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.codesalot.com/2012/adding-external-contacts-to-the-lync-addressbook/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Testing</title>
		<link>http://www.codesalot.com/2011/testing-2/</link>
		<comments>http://www.codesalot.com/2011/testing-2/#comments</comments>
		<pubDate>Thu, 26 May 2011 11:03:18 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[site maintenance]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.codesalot.com/?p=343</guid>
		<description><![CDATA[I&#8217;m going to test some new designs for the page, so the layout might be a bit weird from time to time&#8230;]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to test some new designs for the page, so the layout might be a bit weird from time to time&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codesalot.com/2011/testing-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List static routing config</title>
		<link>http://www.codesalot.com/2011/list-static-routing-config/</link>
		<comments>http://www.codesalot.com/2011/list-static-routing-config/#comments</comments>
		<pubDate>Thu, 26 May 2011 07:51:23 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Unified Communications]]></category>
		<category><![CDATA[Lync]]></category>
		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://www.codesalot.com/?p=328</guid>
		<description><![CDATA[After adding a static route to Lync (for example when adding a CTP integration) you can use the following command to show the route: Identity : Service:Registrar:lspool01.contoso.com Route    : {MatchUri=video.contoso.com;MatchOnlyPhoneUri=False;Enabled=True;ReplaceHostInRequestUri=False} This will list the static route, but it won&#8217;t show all the route details (specifically the route target which is semi often used in troubleshooting) [...]]]></description>
			<content:encoded><![CDATA[<div>After adding a static route to Lync (for example when adding a <a href="http://www.codesalot.com/2011/script-new-ciscotelepresenceintegration-ps1/">CTP integration</a>) you can use the following command to show the route:</div>
<pre class="brush: powershell; title: ; notranslate">
Get-CsStaticRoutingConfiguration Service:Registrar:lspool01.contoso.com
</pre>
<pre>Identity : Service:Registrar:lspool01.contoso.com
Route    : {MatchUri=video.contoso.com;MatchOnlyPhoneUri=False;Enabled=True;ReplaceHostInRequestUri=False}</pre>
<p>This will list the static route, but it won&#8217;t show all the route details (specifically the route target which is semi often used in troubleshooting) as they are contained inside a Route object in the StaticRoutingConfiguration object. To list the details of the route, do:</p>
<pre class="brush: powershell; title: ; notranslate">

$stroute = Get-CsStaticRoutingConfiguration Service:Registrar:lspool01.contoso.com
$stroute.Route
</pre>
<p>This will give you the content of the route.</p>
<pre>Transport               : TransportChoice=Certificate=Microsoft.Rtc.Management.WritableConfig.Settings.SipProxy.UseDefaultCert;Fqdn=<span style="color: #ff0000;">vcsc.contoso.com</span>;Port=5061
MatchUri                : video.contoso.com
MatchOnlyPhoneUri       : False
Enabled                 : True
ReplaceHostInRequestUri : False</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.codesalot.com/2011/list-static-routing-config/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing with PS: Script: Start remote Lync management session</title>
		<link>http://www.codesalot.com/2011/playing-with-ps-script-start-remote-lync-management-session/</link>
		<comments>http://www.codesalot.com/2011/playing-with-ps-script-start-remote-lync-management-session/#comments</comments>
		<pubDate>Wed, 25 May 2011 13:21:40 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Unified Communications]]></category>
		<category><![CDATA[Lync]]></category>
		<category><![CDATA[RBAC]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.codesalot.com/?p=316</guid>
		<description><![CDATA[I wrote a script to start a remote Lync management shell session based on this post. This of course is a big bloated way to do it (it can be done as a twoliner), but I need the PS training]]></description>
			<content:encoded><![CDATA[<p>I wrote a script to start a remote Lync management shell session based on <a href="http://blogs.technet.com/b/csps/archive/2010/06/16/qsremoteaccess.aspx">this</a> post. This of course is a big bloated way to do it (it can be done as a <a href="http://blog.powershell.no/2010/12/05/lync-server-2010-remote-administration/">twoliner</a>), but I need the PS training <img src='http://www.codesalot.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<pre class="brush: powershell; title: ; notranslate">
##########################################################################################################################
# New-RemoteCSPSsession.ps1
#
# Opens a remote session to a Lync Management Shell and imports all commands
#
# Uses current logged inn credentials, but can optionally supply other credentials.
#
# eg.
# Prompt for fefqdn:
# .\New-RemoteCSPSsession.ps1
#
# Use other credential:
# .\New-RemoteCSPSsession.ps1 -othercredential $true
#
# Ignore certificates on fe:
# .\New-RemoteCSPSsession.ps1 -notrust $true
#
# fefqdn can be passed in arguments as well:
# .\New-RemoteCSPSsession.ps1 -csfe lync-admin.contoso.local
#
# Written by Tom-Inge Larsen (www.codesalot.com), based on this blogpost:
# (http://blogs.technet.com/b/csps/archive/2010/06/16/qsremoteaccess.aspx)
# this script can also easily be run as a twoliner:
# (http://blog.powershell.no/2010/12/05/lync-server-2010-remote-administration/)
#
# $session = New-PSSession -ConnectionUri https://lync-admin.contoso.local/OcsPowershell -Credential (Get-Credential)
# Import-PSSession -Session $session
#
#
##########################################################################################################################
param($othercredential,$notrust,$csfe)

$env = get-host
$majorversion = $host.version.major

if ($majorversion -lt 2) {
 write-Host &quot;You need to run at least Powershell 2.0 to run this script. http://support.microsoft.com/kb/968929&quot;
} else {

if ($csfe -eq $null) {
 $csfe = Read-Host &quot;Please enter the FQDN of the Lync Front End pool you want to connect to&quot;
 }

 $connectionURI = &quot;https://&quot;+$csfe+&quot;/OcsPowershell&quot;
 $cmdstring = 'New-PSSession -ConnectionUri $connectionURI'

 if ($othercredential -eq $true) {
 $credential = Get-Credential
 $cmdstring += ' -Credential $credential'
 }
 if ($notrust -eq $true) {
 $sessionoption = New-PSSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck
 $cmdstring += ' -SessionOption $sessionoption'
 }

 $session = &amp; $executioncontext.invokecommand.NewScriptBlock($cmdstring)

 Import-PSSession $session
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.codesalot.com/2011/playing-with-ps-script-start-remote-lync-management-session/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Presence issues with the calendar integration in CU2?</title>
		<link>http://www.codesalot.com/2011/presence-issues-with-the-calendar-integration-in-cu2/</link>
		<comments>http://www.codesalot.com/2011/presence-issues-with-the-calendar-integration-in-cu2/#comments</comments>
		<pubDate>Fri, 20 May 2011 08:55:40 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Unified Communications]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[errors]]></category>
		<category><![CDATA[Lync 2010]]></category>
		<category><![CDATA[Presence]]></category>

		<guid isPermaLink="false">http://www.codesalot.com/?p=312</guid>
		<description><![CDATA[I just had a case where the users experienced that presence in the Lync client did not update based on the calendar information unless they restarted the client completely. Relogging did not help. The weird thing was that on the users contact card they would be listed as busy, but their presence was still available. [...]]]></description>
			<content:encoded><![CDATA[<p>I just had a case where the users experienced that presence in the Lync client did not update based on the calendar information unless they restarted the client completely. Relogging did not help.</p>
<p>The weird thing was that on the users contact card they would be listed as busy, but their presence was still available.</p>
<p><img class="alignnone size-full wp-image-313" title="presence" src="http://www.codesalot.com/wp-content/uploads/2011/05/presence.jpg" alt="" width="306" height="318" /></p>
<p>After quite a bit of troubleshooting and some help from colleagues, I ended up removing CU2 (the April 2011 update, gives version .275 to the client). This removed the problem completely. So, if you are having presence issues with Lync, try removing CU2 for now.</p>
<p>This might be a bug?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codesalot.com/2011/presence-issues-with-the-calendar-integration-in-cu2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lync 2010 and EWS followup</title>
		<link>http://www.codesalot.com/2011/lync-2010-and-ews-followup/</link>
		<comments>http://www.codesalot.com/2011/lync-2010-and-ews-followup/#comments</comments>
		<pubDate>Fri, 06 May 2011 14:04:15 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.codesalot.com/?p=306</guid>
		<description><![CDATA[This is a followup to this post. Turns out that Outlook doesn&#8217;t really like autodiscover through SRV records and proceeds to ask the user for authentication when this happens. This is often not a desireable situation. The other option seemed to be to add names for autodiscover.domain.com for each of the SMTP domains to the [...]]]></description>
			<content:encoded><![CDATA[<p>This is a followup to <a href="http://www.codesalot.com/2011/lync-2010-and-exchange-web-servicesautoconfigure/">this</a> post.</p>
<p>Turns out that Outlook doesn&#8217;t really like autodiscover through SRV records and proceeds to ask the user for authentication when this happens. This is often not a desireable situation.</p>
<p>The other option seemed to be to add names for autodiscover.domain.com for each of the SMTP domains to the certificate on the CAS. We tried this as well, but in this configuration the Lync client started asking about trust of the server. A bit of searching led me to <a href="http://blogs.technet.com/b/jenstr/archive/2011/02/10/lync-cannot-verify-that-the-server-is-trusted-for-your-sign-in-address.aspx">this</a> post by Jens Trier Rasmussen that explains why.</p>
<p>I was not able to find any place to add trusted servers to Lyncs trusted server list, but for Outlook i could, so the solution was to revert to SRV records, and add this regkey to the machines:</p>
<pre class="brush: plain; title: ; notranslate">

Office 2007:
HKCU\Software\Microsoft\Office\12.0\Outlook\AutoDiscover\RedirectServers

Office 2010:
HKCU\Software\Microsoft\Office\14.0\Outlook\AutoDiscover\RedirectServers
</pre>
<p>add the CAS server FQDN as the value name of a key with value type REG_SZ and empty value data.</p>
<p>This tells Outlook to always trust this server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codesalot.com/2011/lync-2010-and-ews-followup/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Federate with Lync Online</title>
		<link>http://www.codesalot.com/2011/federate-with-lync-online/</link>
		<comments>http://www.codesalot.com/2011/federate-with-lync-online/#comments</comments>
		<pubDate>Fri, 06 May 2011 12:59:16 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Unified Communications]]></category>
		<category><![CDATA[Lync 2010]]></category>
		<category><![CDATA[Lync Online]]></category>
		<category><![CDATA[Office 365]]></category>
		<category><![CDATA[Oneliners]]></category>

		<guid isPermaLink="false">http://www.codesalot.com/?p=299</guid>
		<description><![CDATA[To federate with Lync Online/Office 365, run: Here&#8217;s how to do it using GUI: http://techietom.co.uk/blog/2011/04/how-to-enable-office365-lync-online-to-federate-with-lync-on-prem/]]></description>
			<content:encoded><![CDATA[<p>To federate with Lync Online/Office 365, run:</p>
<pre class="brush: powershell; title: ; notranslate">
New-CSHostingProvider –identity LyncOnline –ProxyFqdn sipfed.online.lync.com –Enabled $True

Enable-CSTopology
</pre>
<p>Here&#8217;s how to do it using GUI: <a href="http://techietom.co.uk/blog/2011/04/how-to-enable-office365-lync-online-to-federate-with-lync-on-prem/">http://techietom.co.uk/blog/2011/04/how-to-enable-office365-lync-online-to-federate-with-lync-on-prem/</a></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.codesalot.com/2011/federate-with-lync-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What to do if users are enabled for LCS?</title>
		<link>http://www.codesalot.com/2011/what-to-do-if-users-are-enabled-for-lcs/</link>
		<comments>http://www.codesalot.com/2011/what-to-do-if-users-are-enabled-for-lcs/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 13:06:32 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Unified Communications]]></category>
		<category><![CDATA[LCS 2005]]></category>
		<category><![CDATA[Lync]]></category>
		<category><![CDATA[Migration]]></category>

		<guid isPermaLink="false">http://www.codesalot.com/?p=295</guid>
		<description><![CDATA[I just had a Lync installation where it turned out that about 5 years ago they had tried installing LCS 2005 in AD, an installation that had failed and the servers had been taken down without being disabled. The users that had been enabled that time was therefore still enabled for LCS in AD, and first of [...]]]></description>
			<content:encoded><![CDATA[<p>I just had a Lync installation where it turned out that about 5 years ago they had tried installing LCS 2005 in AD, an installation that had failed and the servers had been taken down without being disabled.</p>
<p>The users that had been enabled that time was therefore still enabled for LCS in AD, and first of all did not appear when trying to search for them in the &#8220;enable users&#8221; UI. Searching for them with &#8220;Legacy users&#8221; filter on showed them, but failed when trying to move them with the &#8220;Move users&#8221; script in BigFin. It is also not supported to move LCS enabled users to Lync. Disabling them in BigFin will also not work. The error message will say something about users not enabled for rich presence, which was added in 2007 R2.</p>
<p>What will work though is the cmdlet Disable-CsUser. Run the cmdlet on the affected users, and then enable them as a normal non-enabled user again after that. I guess that old buddy lists and settings from LCS will be removed by this as well, so it is not a recommended migration path though. In my case this was not important.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codesalot.com/2011/what-to-do-if-users-are-enabled-for-lcs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script &#8211; New-CiscoTelepresenceIntegration.ps1</title>
		<link>http://www.codesalot.com/2011/script-new-ciscotelepresenceintegration-ps1/</link>
		<comments>http://www.codesalot.com/2011/script-new-ciscotelepresenceintegration-ps1/#comments</comments>
		<pubDate>Tue, 05 Apr 2011 08:44:45 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Unified Communications]]></category>
		<category><![CDATA[Cisco Telepresence]]></category>
		<category><![CDATA[Lync]]></category>
		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://www.codesalot.com/?p=289</guid>
		<description><![CDATA[Script to enable routes from Lync to VCS Control:]]></description>
			<content:encoded><![CDATA[<pre>Script to enable routes from Lync to VCS Control:
<pre class="brush: powershell; title: ; notranslate">
######################################################################################################################################################################################
# New-CiscoTelepresenceIntegration.ps1
#
# Adds config in Lync 2010 for integration with Cisco Telepresence (Tandberg)
#
# Can optionally write logs to file or screen using -verbose and/or -logFile inputs
#
# eg.
# Clean Lync installation
# .\New-CiscoTelepresenceIntegration.ps1 -vcscfqdn vcsc011.contoso.com -lsfepool lspool01.contoso.com -CTPSipDomain video.contoso.com -logFile &quot;c:\logfile.txt&quot;
#
# Coexisting with OCS 2007 R2
# .\New-CiscoTelepresenceIntegration.ps1 -coexistence $true -r2pool r2pool01.contoso.com -lsfepool lspool01.contoso.com -CTPSipDomain video.contoso.com -logFile &quot;c:\logfile.txt&quot;
#
# Migration from OCS 2007 R2 to Lync
# .\New-CiscoTelepresenceIntegration.ps1 -hascoexisted $true -vcscfqdn vcsc011.contoso.com -lsfepool lspool01.contoso.com -CTPSipDomain video.contoso.com -logFile &quot;c:\logfile.txt&quot;
#
# Important:
# This will delete any existing static routes created ! Do not run the script with hascoexisted = $true if you have added manual routes other than OCS/Lync/CTP integration
#
# Written by Tom-Inge Larsen (&lt;a href=&quot;http://www.codesalot.com&quot;&gt;www.codesalot.com&lt;/a&gt;), Peder Saether and Trond Egil Gjelsvik-Bakke
# Based on config made by Marjus Sirvinsks (marjuss.wordpress.cm)
#
#######################################################################################################################################################################################
param($logFile,$coexistence=$false,$hascoexisted,$CTPSipDomain,$lsfepool,$r2pool,$vcscfqdn)

if ($logFile -ne $null) {
 $a = &quot;Steps made to enable integration with Cisco Telepresence: `n&quot;
 Out-File -FilePath $logfile -InputObject $a
}

if ($lsfepool -eq $null) {
 $lsfepool = Read-Host &quot;Please enter Lync Front End pool FQDN.&quot;
}

if ($CTPSipDomain -eq $null) {
 $CTPSipDomain = Read-Host &quot;Please enter the SIP domain in the Cisco Telepresence environment.&quot;
}

if ($coexistence -eq $false) {
 #Change encryption level if SRTP option is not available for VCS
 $mediaconfiguration = get-csmediaconfiguration
 $requireencryption = ($mediaconfiguration.EncryptionLevel -eq &quot;RequireEncryption&quot;)
 if ($requireencryption) {
 write-warning &quot;This will set the media encryption level to Support Encryption. Are you sure you want to do this? (y/n)&quot;
 $confirmation = Read-Host

 } else {
 $confirmation = 'y'
 }
 switch ($confirmation) {
 'y' {
 set-CsMediaConfiguration -EncryptionLevel supportencryption

 $registrarid = &quot;service:registrar:&quot;+$lsfepool
 $trustedappregistrar = &quot;Registrar:&quot;+$lsfepool

 if ($hascoexisted -eq $true) {
 Remove-CsStaticRoutingConfiguration -Identity $registrarid
 }

 if ($vcscfqdn -eq $null) {
 $vcscfqdn = Read-Host &quot;Please enter the FQDN for the VCS Control&quot;
 }

 #Establish trust
 $applicationpooladded = $true
 New-CsTrustedApplicationPool -Identity $vcscfqdn -Registrar $trustedappregistrar -site 1 -RequiresReplication $false -ThrottleAsServer $true -TreatAsAuthenticated $true -force

New-CsTrustedApplication -ApplicationID &quot;CiscoTelepresenceDirectSIP&quot; -TrustedApplicationPoolFqdn $vcscfqdn -Port 5061

 #Create static routes if needed

 if ($hascoexisted -eq $true) {
 New-CsRegistrarConfiguration -Identity $registrarid
 }

 New-CsStaticRoutingConfiguration -identity $registrarid

$route = New-CsStaticRoute -TLSRoute -destination $vcscfqdn -port 5061 -matchuri $CTPSipDomain -usedefaultcertificate $true

Set-CsStaticRoutingConfiguration -identity $registrarid -route @{Add=$route}

 Enable-CsTopology
 }
 'n' {
 Write-Warning &quot;No change was made to the topology. Media Encryption Level must be set to Support Encryption&quot;
 if ($logFile -ne $null) {
 $a = &quot;No change has been made. `n&quot;
 Out-File -FilePath $logfile -InputObject $a -Append
 }
 }
 }
}

else {

# If we coexist with R2, we might want to route all traffic via R2 FE, to possibly avoid
 # compromising security with deployments using TCP or if Lync is only intended as a
 # pilot.

 if ($r2pool -eq $null) {
 $r2pool = Read-Host &quot;Please enter OCS 2007 R2 Front End pool FQDN.&quot;
 }

 $registrarid = &quot;service:registrar:&quot;+$lsfepool

 New-CsRegistrarConfiguration -Identity $registrarid
 New-CsStaticRoutingConfiguration -identity $registrarid

$route = New-CsStaticRoute -TLSRoute -destination $r2pool -port 5061 -matchuri $CTPSipDomain -usedefaultcertificate $true
 Set-CsStaticRoutingConfiguration -identity $registrarid -route @{Add=$route}

Enable-CsTopology
}

if ($logFile -ne $null) {

$a = &quot;Route added: `n&quot;
 Out-File -FilePath $logfile -InputObject $a -Append
 Get-CsStaticRoutingConfiguration $registrarid | Select-Object -ExpandProperty Route | Where-Object {$_.MatchUri -eq $CTPSipDomain} | Out-File -FilePath $logfile -Append
 if ($applicationpooladded -eq $true){
 $a = &quot;`nTrusted Application Pool added:`n&quot;
 Out-File -FilePath $logfile -InputObject $a -Append
 Get-CsTrustedApplicationPool $vcscfqdn | Out-File $logfile -append
 }
 $a = &quot;`nRegistrar added:`n&quot;
 Out-File -FilePath $logfile -InputObject $a -Append
 Get-CsStaticRoutingConfiguration $registrarid | Out-File $logFile -append

 if ($confirmation -eq 'y') {
 $a = &quot;`nMedia encryption level was already set to or was set to Support Encryption.`n&quot;
 Out-File -FilePath $logfile -InputObject $a -Append
 }

 Write-Host &quot;Logfile: &quot; $logFile &quot;is written.&quot;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.codesalot.com/2011/script-new-ciscotelepresenceintegration-ps1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>moe.am: Using pictures from AD in the usertile in win7</title>
		<link>http://www.codesalot.com/2011/moe-am-using-pictures-from-ad-in-the-usertile-in-win7/</link>
		<comments>http://www.codesalot.com/2011/moe-am-using-pictures-from-ad-in-the-usertile-in-win7/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 11:33:43 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[AD]]></category>
		<category><![CDATA[pictures]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[usertile]]></category>
		<category><![CDATA[windows 7]]></category>

		<guid isPermaLink="false">http://www.codesalot.com/?p=287</guid>
		<description><![CDATA[Great post from Oddvar on using pictures from AD. http://www.moe.am/index.php/2011/02/using-pictures-from-active-directory/]]></description>
			<content:encoded><![CDATA[<p>Great post from Oddvar on using pictures from AD.</p>
<p><a href="http://www.moe.am/index.php/2011/02/using-pictures-from-active-directory/">http://www.moe.am/index.php/2011/02/using-pictures-from-active-directory/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.codesalot.com/2011/moe-am-using-pictures-from-ad-in-the-usertile-in-win7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

