Skype for Business Users’ pictures from URLs

This was out first on the November 2013 update for Lync Server 2013 where Microsoft brought back the (not so) loved Lync 2010 feature feature of allowing users to set their Lync pictures to internet accessible photos.
Soon, all users in the organization were superheroes and Sports Illustrated models.

Users that were not enabled for this feature will only see the following when trying to change their photo:

No photo option

A short command will add this feature to any policy that you had at the time and you could later control this with the Set-CsClientPolicy -DisplayPhoto, specifying “NoPhoto”,
“PhotosFromADOnly”, or “AllPhotos”

Now, what happens if you have a new client policy that requires this feature? (Or you never enabled it before?)

First, find out which policies are enabled with this feature by running the following:

Get-CsClientPolicy | ft Identity,PolicyEntry

The result should be similar to this:

Before

unless this was never enabled in your environment, then all of the above should be empty with only “{}”.

Now choose the policy you want to assign this feature to and run the following command:

$NPE=New-CsClientPolicyEntry -Name EnablePresencePhotoOptions -Value True

$Policy=Get-CsClientPolicy -Identity <PolicyName>

$Policy.PolicyEntry.Add($NPE)

Set-CsClientPolicy -Instance $Policy

Make sure you replaced “<PolicyName>” with your actual policy and then run the
Get-CsClientPolicy | ft Identity,PolicyEntry” command again.
The output will now show you have that set for the policy you chose:

After

And the Client can now change their profile photo:

New Photo

Remember there’s still a restriction on picture sizes (30 KB Max) and they must be publically available.

Client

Advertisements

Skype for Business client – force address book download

If you’re using the next version of Office (That’s Office 2016, Preview available for download here), you’re already using the new Skype for Business client.

Results

If you used Lync before and now you find that your address book is not up to date and you get the “Address book synchronizing. Results may not be current” message, you might want to force your client to download the address book.

This is a fairly simple task, and it’s quite similar to the workaround from the Lync 2010 and 2013 clients; all you need to do is add a registry key and you’re done.
If you already added this registry in the past, you’ll notice it stopped working, and here’s the reason:
The registry key we’re using for this is:

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Office\15.0\Lync\GalDownloadInitialDelay with a value of ‘0’.

But if you go to %userprofile%\AppData\Local\Microsoft\Office you’ll see that you now have a 15.0 folder and a 16.0 folder:

16FolderThis needs to be presented in the registry too.
So add the following key to your registry using an elevated command prompt window:

reg add HKLM\Software\Policies\Microsoft\Office\16.0\Lync /v GalDownloadInitialDelay /t REG_DWORD /d 0 /f

Exit the client, delete the two GalContacts files from your SIP_Username folder under the 16.0\Lync folder and restart the client.

GALfiles

You’re address book will be immediately downloaded to your client.

‘Tis the season to prepare – Add Ireland Public holidays for 2015 to Lync Server

It’s this time of the year again, and the most common question is “What do we do when we’re going on holidays?”.

The answer is here! (That is, if you live in Ireland :)) – the attached script will add all Public holidays for 2015 …And then some:

According to the Citizen Information Board, the following are Public Holidays in Ireland in 2015:

  • New Year’s Day (1 January)
  • St. Patrick’s Day (17 March)
  • Easter Monday (This year it’s 4 April)
  • First Monday in May, June, August (4 May, 1 June, 6 August)
  • Last Monday in October (26 October)
  • Christmas Day (25 December)
  • St. Stephen’s Day (26 December)
    Good Friday is not a public holiday.

The script will add all of the above and the following:

  • Christmas Day 2014 (25 December)
  • St. Stephen’s Day 2014 (26 December)
  • New Year’s Day 2016 (1 January)

You will need to check the new holiday set box for your RSG Workflows to activate your holiday configuration.

To run the script, simply run it one of your Lync servers. The script will confirm that you have local admin permissions and will prompt you for automatic elevation if necessary.

then, it will search for and display your existing application servers, please choose the one(s) running your RGS.
The new improvement to the script is that it will ask you whether you’re using a 12-hour or 24-hour configuration on your machine to determine how to run.
Once you choose 12 or 24 hour configuration, the script will run and add a holiday set called “Ireland Public Holidays 2015”.

Holidays

Download the script here.

Lync 2013 E.164 CLI and carriers (It’s that Plus sign!)

If you’re using Lync properly, you must have all your numbers in accordance with the E.164 format, as recommended by Microsoft and as often preached by Ken Lasko.

There are many benefits for using E.164, but – like any good thing – it comes with some flaws. One of these flaws when using Lync 2013 is that Lync will cease normalizing numbers that are prefixed with +.
The moment you add the ‘+’ sign to your number, Lync will consider it already normalized and will not process any more rules.

This can cause issues with some providers that require us to remove the leading ‘+’ sign from the number.
The work around for dialled numbers (Or as Lync describes it “Called Numbers”) is to use the Set-CsTrunkConfiguration command to remove ‘+’ sign at the trunk level by adding the parameter -RemovePlusFromUri $true.

This is all good for numbers Called – but what about numbers Calling? How can we manipulate the “Source” number?
If we look at a trace from Lync we can see that the destination number is stripped from it’s leading ‘+’, but the source number still has that annoying sign, although I have a rule that says it’s removing it:

With plus

The SIP invite shows the issue:
INVITE sip:3531891170170@MediaGateway.y0av.local;user=phone SIP/2.0
FROM: <sip:+35314396804;ext=6804@y0av.com;user=phone>;epid=3DFA3756A7;tag=1e448bc93
TO: <sip:3531891170170@MediaGateway.y0av.local;user=phone>

As you can see in the image above, the ‘+’ sign is removed from the destination number, but it’s still there on my source number.
This might result on certain carriers dropping the call since they’re expecting the CLI with no ‘+’.

The workaround:

If you’re working with a gateway or a SBC, you’ll usually be able to work around this issue by stripping the ‘+’ there, simple as this.

If you’re working with Lync only and using a direct SIP trunk to your provider – it’s easy too!
The numbers are not normalized due to Lync’s lack of ability to ignore the rest of the data in the FROM line; when we’re creating normalization rules within Lync, we will usually be looking at numbers and specific characters, not the entire weird string.
The workaround then, is to treat the entire string as… a string.
I add the following rule for my “Calling Numbers” manipulation in the trunk:

Rule

This rule says that whenever a number starts with a plus and has at least 8 characters (ANY character) following it, we should ignore the ‘+’ and send only the characters:
Pattern to match: ^\+(.{8,})
Translation rule: $1
Of course, you can change that to look for more numbers if you have other rules there.

Once the rule has been placed and committed, traces look like this now:

Without Plus

The SIP Invite shows the difference:
INVITE sip:3531891170170@MediaGateway.y0av.local;user=phone SIP/2.0
FROM: “Yoav Barzilay”<sip:35315267877;ext=7877@y0av.com;user=phone>;epid=3DFA3756A7;tag=c9b24cf3b
TO: <sip:3531891170170@MediaGateway.y0av.local;user=phone>

 

Lync 2013 November 2014 update

As part of the full Office 2013 update dated November 11, 2014 (See here for full details), Lync 2013 clients gets an update as well, KB2899507.

The update fixes the following issues:

  • Video freezes consistently for two second-intervals when you make a video call in Lync 2013
  • Incorrect format of string in a trace statement when application sharing session viewers stop viewing in a conference
  • Memory leak occurs when you start a peer-to-peer application sharing session in Lync 2013
  • Lync 2013 crashes when you join a meeting that is hosted on Lync Server 2010 as an anonymous user
  • Lync 2013 freezes when a toast notification of a call appears

32bit update
64bit update

More information here.

Lync 2013 Edge Network Diagram

No news here: there are many versions of this on the internet, and we’re all using the old one:

Edge Ports

(Source: http://technet.microsoft.com/en-us/library/gg425891.aspx)

This diagram is important in any Lync discussion as it shows exactly the ports and protocols required for Lync Edge servers and Reverse Proxy, and the traffic flow between the DMZ and the LAN.

However, I find it a little outdated (Office Web Apps missing) and sometimes I need a little more space to draw some stuff and write down IP addresses and other stuff when meeting with customers and colleagues.
I drew an updated, more spacious one for my use, shared with your here:

Edge Digram_v2

 

There’s also a PDF version of this here.

Understanding: Lync client Configuration Information

We use many tools to troubleshoot Lync.

the “Lync Configuration Information” option on the Lync client actually provides a lot of useful information about how the client connects to the server and can help identifying issues.

To access the Lync client’s configuration information, go to your computer’s Notification area and look for the Lync icon:

Notification AreaHit Ctrl and right-click the Lync icon, then choose “Configuration information”:

Lync Configuration InformationA new window will open up, showing you your client’s configuration:

Configuration Window

This Windows will provide you with all the information your client is retrieving from the server and from your settings.
You can copy the contents of this windows to a text editor by clicking “Copy”, or close it by hitting “Close”.
“Refresh”, however, will surprise you and do nothing. If you want to refresh the information displayed in this window you’ll have to close and reopen it…

Let’s cover this Windows’s contents line by line. Note you might not have all the information populated. This might depend on your actual implementation or connection state:

 

DG URL Internal Lync Server 2013 will populate the Lync address book with all the Distribution Groups it finds in your Environment. If in the organization’s network, your client will use this URL to connect to the server and expand these groups to show theirs members. This should normally point to the address of your Front-end pool or server.
DG URL External Same as DG URL Internal, only for external users. Your client will use this URL to connect to the server and expand these groups to show their members when you’re connected to Lync from outside of your organization’s network. This should normally point to the address of your Reverse-Proxy server, representing Lync’s External base URL.
Quality Metrics URI This should represent the address of the Front-end server you’re connected to. The Front-end server will in turn use the MSMQ feature to send your quality metrics to the Monitoring Server. If this field is populated, it means you have monitoring enabled for the pool you’re connected to.
ABS Server Internal URL If configured to download the Lync address book via web service, your client will use this url when connected inside the oraniztion’s network.
ABS Server External URL Your client will use this url to download the Lync address book when connected outsidde of the oraniztion’s network.
Voice mail URI This string shows how other clients and services are calling your voicemail.
Exum URL This field represents how calls are routed to your mailbox. It would normally show a familiar dial plan’s name or just say “destination=default”. Having this fileld populated usually means you’re enabled for Voice mail.
MRAS Server MRAS stands for “Media Relay Authetication Service”. This service provides your credentials to the AV Edge Server. when this field is populated, it means you successfuly authenicted against the AV Edge server.
GAL Status This field shows which server was used to download the address book and if it was successful.
Focus Factory The “Focus Factory” is where all your conferences are created. The server will use the URI listed in this field when you create a new conference or Lync Meeting.
Line This shows your line URI.
Line Configured From “Line configured from” shows where the line was configured. In this case, the line was configured on the server.
Location Profile This setting is actually pulled from your Exchange server, and represents the location profile of your Exchnage UM Dial plan.
Call Park Server URI If you enabled Call Parking for this environment, your call park server URI will be displayed here.
Server Address Internal If you configured your Lync client to use a manually entered internal address (see This post), the configuration will be displayed here. Note that even if you switched to automatic configuration but haven’t cleared the names, it will still be displayed here.
Server Address External Same as Server Address Internal, but for external access addresses.
Server SIP URI Denotes the SIP uri that’s signed against the server.
Exum Enabled will say “TRUE” if you’re enabled for Exchange UM or “FALSE” if, well, you’re not.
Controlled Phones This will display your phone’s model if you have a Tanjay-compatible device connected.
GAL or Server Based Search Depending on your Client Policy Configuration, this will display whether you’re retrieving the adress book using the web service or the Lync Shared Folder.
PC to PC AV Encryption Should usually say “AV Encryption Enforced” unless you changed it to “DoNotSupportEncryption” or “RequireEncryption” on your Media Configuration settings.
Telephony Mode This will display either “Telephony Mode UC Enabled” if you’re Entreprise Voice enabled, “Telephony Mode Disabled” if you’re set to PC-to-PC only, “Telephony Mode No Audio” If you have Audio/Video disabled, “Telephony Mode RCC Enabled” if you have RCC turned on, or “Telephony Mode RCC Only” if you enabled RCC only for this user.
Line Configured From I have only seen this one set as “Auto Line Configuration”.
Configuration Mode “Auto Configuration” means you’re set to automatically find and connect tho the server. “Manual Configuration” means you’re using the values provided in “Server Address Internal” and “Server Address External” to connect to the server.
EWS Internal URL This should point to the internal url of your EWS virtual directory, i.e. your internal Exchange CAS or CAS Array. If this setting is misconfigured (automatically retrived from Exchange), you might not be able to access Outlook free-busy from you Lync client and Lync phone.
EWS External URL Points to the address of your external EWS virtual directory, based on the settings of your organizations’ Exchange Autodiscover configuration. If you’re using Office 365 Exchange Online, you will see only this field populated, pointing to https://outlook.office365.com/EWS/Exchange.asmx/WSSecurity.
SharePoint Search Center URL points to your organization’s SharePoint Search Center URL if you configured Lync-SharePoint integration.
Skill Search URL points to your organization’s SharePoint Skill Search URL if you configured Lync-SharePoint integration.
Connected Lync Server Shows which server you’re connected to at the moment.
Local Log Folder Shows the location of the Lync logging folder. This usually points to %userprofile%\AppData\Local\Microsoft\Office\15.0\Lync\Tracing.
Inside User Status If set to “TRUE” – the user is connected directly to a Front-End server or a director. If set to “FALSE” – the user is connected to the organization via the Edge server.
Contact List Provider Will display “Lync Server” if Lync is providing the contacts list, or “UCS” if Exchange Unified Contact Store provides it.
Pairing State Will determine wehther Pairing is enabled or not, and will display the phone’s model if paired.
UCS Connectivity State Will display “Exchange connection Down” if UCS is not your Contact List Provider or if Lync can’t make a connection to the UCS.
MAPI Information “MAPI OK” means Lync was able to communicate with Exchange via Outlook. “UCMAPI is connected to Outlook, but one or more folders are not updating.;MAPI unavailable” means either the Lync user and the Outlook profile don’t match, or Outlook is closed.
EWS Information “EWS Status OK” means Lync was able to contact Exchange through EWS, “EWS has not fully initialized” means it’s in the process of Autodiscovering EWS, “EWS not deployed” meand Lync was not able to communicate with Exchange via EWS.
License State Shows if Lync is licensed and what sort of licesnse is assigned.
Hanging Notification Status This will either appear as “Connected” or “Disconnected”, any input on this field is appreciated!
pChat Room Mgmt Int URL Denotes the internal url for Persistent Chat Room Management
pChat Room Mgmt Ext URL Denotes the external url for Persistent Chat Room Management
pChat URIs Will display all Persistent Chat URIs
pChat Default URI Will display the defualt Persistent Chat URI
pChat Enabled? “True” means you’re Persistent Chat enabled and the above filelds shoud be populated. “False” means you were not enabled for Persistent Chat, and the above fields shoud be blank.

 

Compare Lync users’ policies script

Had the privilege to help a friend and a colleague, Guy Bachar, owner of the Just a Lync Guy blog, writing the following script.

This script helps admins compare the policies of two Lync users and see the differences between them:

Policy comparison

The output is pretty clear and displayed on the screen. We’re working on an exportable version as well… 🙂

Comments and suggestions are welcome!

Download the script here.