Script: Set-CsKhiCollectorSet.ps1

Lync Key Health Indicators are an essential tool in health monitoring your Lync deployment, and is the first step in deploying the Lync Call Quality Methodology

After adding the KHI counters to applicable Lync servers, it can be quite the chore to log in to all of them to start the performance counters. It is possible to reach all computers from a Performance Monitor snapin, but with a lot of servers that too can take some time.

This script finds all servers that normally run KHI counters, and starts or stops the counters on them. It can also get the current running status of the counters. It is also possible to supply a csv with servers to run on to the script.

Download here Set-CsKhiCollectorSet.zip

A change of scenery

After eight years at Atea the time has come for a change of scenery. As of today me and Christian Knarvik start a new adventure at Knowledge Factory where we will bring KF to southern Norway. I am really looking forward to starting work with bringing Skype for Business to Norway together with KF.

I want to thank my colleagues in Atea for the last eight years – and to my new colleagues in KF, I can’t wait to get to know you all!

Lync, Skype and Cisco Telepresence clients in the same video conference!

Late afternoon last Friday (In europe at least :)), Microsoft released video calling between Lync and Skype. This has been something that a lot of us has been waiting for for quite some time! You can read more about this release here.

To be able to video call a Lync contact from Skype, and vice versa, the following needs to be set up:

  • The Lync environment needs to be federated wilyncoptionsth Skype – see the Provisioning Guide
  • The Lync user needs to use the Lync 2013 client.
  • The Lync user has to be enabled for Public Access, and will have to set “Contacts not using Lync” to “Allow invites but block all other communications” or “Allow anyone to contact me” under “Alerts” in the Lync options menu.
  • If set to “Allow invites but block all other communications” both the Lync user and the Skype user must add each other to their contact lists
  • Currently it will only work from Skype on a Windows desktop running at least version 7.0.x.100. More Skype clients will be supported in the coming months.

This also brings cool opportunities when using Lync together with for instance Acano or Pexip MCU software. This screenshot is from a video conference using the Acano brigde, and here is a Skype Client, a Lync Client and a Lync mobile Client brought together with a Cisco Telepresence room! Pretty awesome! The screenshot is taken from the Skype Client.lyncskypeciscotp

 

Time to learn appcoding – Range Predictor

Well, the time has come to learn to code Windows apps.

I coded a lot when I went to college, but since then it has only been the occasional PowerShell scripting. I had forgotten how relaxing it is to just sit down and write code, and thats what I’ve been doing this summer – it has more or less replaced the little time I had left for gaming, which usually is my go-to timesink when I need to disconnect from the world around me.

My ‘Hello World’ project ended up being this little range calculator for Electric cars. I’ve recently bought a Renault Zoe, and this seemed like a nice little tool to have, especially considering that the guess-o-meter remaining range display in the car is a bit unpredictable.

The idea originally came from this forum post at myrenaultzoe.com forums, but I’ve also added support for a couple of other cars with battery capacity data sourced from wikipedia. I’ve also put in the Zoe Range rule Trevors android app uses if you select the Zoe as the car.

In the near future I’m probably going to add a Windows 8 store app as well, as it is written as a universal app, and I’m thinking of also adding maps With the range drawn on the map. I might also at some point use the NOBIL API to pull at least Norwegian charging stations and display them on the map. Shouldn’t be too hard to get directions either once you get that far – but now I’m dreaming a bit :)

So without further ado, here’s my first Windows Phone app:

http://www.windowsphone.com/s?appid=e5795f97-b78d-4642-ace9-c36170aa5d7f

Lync Meetings and Transport Neutral Encapsulation Format

One of the small things that make Lync Meetings so simple to join is that Outlook will recognize the meeting and wil give you a small button on the Outlook reminder that lets you join the meeting without even opening the calendar. This is also the same functionality that clickable from the calendar interface on the mobile and desktop clients and makes the meeting joinable from a Lync Room System.

Some might have noticed though that when the Lync meeting invites come from an external organization, none of the clients will actually recognize the meeting as a Lync meeting. For most of the clients this is not a big problem, because the link in the invite will still be clickable, but for the Lync Room System this will actually render the meeting unjoinable.

The method that is beeing used in the meeting invites to identify a calendar object as a Lync meeting is called Transport Neutral Encapsulation Format, or TNEF. TNEF is basically an attachment format that is used by Outlook and Exchange in different situations additional formatting is needed, like voting and meeting invites.

The global settings for sending TNEF to remote domains is default set to false. This means that when sending Lync Meeting invites out of the organization, the TNEF attachment is stripped off and the recieving party does not get the extra data which in turn makes the Lync clients at the recieving party not recognize the meeting as a Lync meeting.

To resolve this, the sending party needs to enable sending of TNEF attachments to the recieving party. This is done via the RemoteDomain settings, and can be turned on for i.e contoso.com like this:

New-RemoteDomain -DomainName contoso.com -Name Contoso
Set-RemoteDomain -Identity Contoso -TNEFEnabled $true

It is also possible to set TNEF on for all remote domains, but be careful with this as TNEF can cause issues if the recieving end does not use Exchange.

Bug in KB 2863908

There seems to be a bug in the Lync update KB 2863908 that breaks integration between Outlook 2010 and Lync 2013.

If you search for a local outlook contact in lync, it will not display a phone number  on the contact card unless you remove the email address from the contact. If an email address is present on the contact, the lync client will not display any phone numbers for the contact.

As far as I have seen it only occurs when you have Lync 2013 and Outlook 2010.

Removing KB 2863908 resolves the issue.

There are also a couple of threads on the technet forums about this:

http://social.technet.microsoft.com/Forums/en-US/4317ec0e-3287-427d-b875-5b9c93997139/lync-client-2013-does-not-get-contact-phone-numbers-from-outlook-2010?forum=lyncprofile

http://social.technet.microsoft.com/Forums/lync/en-US/130ff6ff-54aa-42a2-86c5-69761eec446a/lync-2013-client-does-not-show-outlook-contact-numbers?forum=ocsclients

Script: Find-CsLineUri

Often I need to find a certain LineUri in Lync. LineUris are most of the time configured on users, so a simple

Get-CsUser -filter {LineUri -like "tel:<e164number>*"}

will give you the result you are looking for. But a user is not the only object in Lync that can have a LineUri, and if you in addition don’t know what object has the LineUri you might need to search through all the objects. This script does just that. Sort of an opposite to Ståle Hansens List-UnusedNumbers.ps1.

The script will also list all objects that have that LineUri, so it is useful in the situations where you have managed to get the same LineUri on two objects and are getting “SIP/2.0 485 Ambiguous” errors on calls. Normally, if you try to give an object a LineUri that is already configured it will throw a powershell error, but there are situations where it doesn’t pick up on it, especially when using the ;ext=1234 addition to the LineUri.

Lync reports a SIP 485 Ambiguous and a Diagnostic ID 4199 "Multiple users associated with the target phone number"

Lync reports a SIP 485 Ambiguous and a Diagnostic ID 4199 “Multiple users associated with the target phone number”

Download Find-CSLineUri.zip or copy the sourcecode:

####################################################################################################
# Find-CsLineUri.ps1
#
# Lists all objects with a given LineUri
#
#
# Passing parameters:
# .\Find-CsLineUri.ps1 +4712345678
#
# Written by Tom-Inge Larsen (http://www.codesalot.com)
#
####################################################################################################
param($getlineuri)

Function ListContents
{
    Param($Heading,$list)

    Write-Host $Heading
    Write-Host "--------------------------------------------------"
    Write-Host

    foreach ($object in $list) {
       $object
    }
}

clear-host

write-debug $getlineuri

$getlineuri = "tel:" + $getlineuri + "*"

Write-debug $getlineuri

$csusers=Get-CsUser -Filter {LineURI -like $getlineuri} | Select-Object SipAddress,LineURI | out-string -stream
$csuserspl=Get-CsUser -Filter {PrivateLine -like $getlineuri} | Select-Object SipAddress,PrivateLine | out-string -stream
$csanalogs=Get-CsAnalogDevice -Filter {LineURI -like $getlineuri} | Select-Object SipAddress,LineURI | out-string -stream
$cscaps=Get-CsCommonAreaPhone -Filter {LineURI -like $getlineuri} | Select-Object SipAddress,LineURI | out-string -stream
$csums=Get-CsExUmContact -Filter {LineURI -like $getlineuri} | Select-Object SipAddress,LineURI | out-string -stream
$csdialins=Get-CsDialInConferencingAccessNumber -Filter {LineURI -like $getlineuri} | Select-Object PrimaryUri,LineURI | out-string -stream
$cstrusteds=Get-CsTrustedApplicationEndpoint -Filter {LineURI -like $getlineuri} | Select-Object SipAddress,LineURI | out-string -stream
$csrgses=Get-CsRgsWorkflow | Where-Object {$_.LineUri -like $getlineuri} | Select-Object PrimaryUri,LineURI | out-string -stream

if ($csusers -ne $null){ListContents -Heading "User" -list $csusers}
if ($csuserspl -ne $null){ListContents -Heading "Private Line" -list $csuserspl}
if ($csanalogs -ne $null){ListContents -Heading "Analog Device" -list $csanalogs}
if ($cscaps -ne $null){ListContents -Heading "Common Area Phone" -list $cscaps}
if ($csums -ne $null){ListContents -Heading "Exchange UM Contact" -list $csums}
if ($csdialins -ne $null){ListContents -Heading "Dial-in Conference Number" -list $csdialins}
if ($cstrusteds -ne $null){ListContents -Heading "Trusted Application Endpoint" -list $cstrusteds}
if ($csrgses -ne $null){ListContents -Heading "Response Group Workflow" -list $csrgses}