msunified.net

Technical blog about Exchange, OCS, Lync, Skype for Business, Teams and Microsoft 365 by Ståle Hansen

How to set custom presence states in Skype for Business on your Windows machine

This works on Windows 10, Windows 8, Windows 7, Lync and Skype for Business desktop clients. Requires administrative rights to your computer. If you are interested in setting Microsoft Teams status, check out how to set the custom Focusing status blogpost

Wouldn’t it be cool if you could change your presence state in Skype for Business to match you current task such as busy in a Workshop, Do Not Disturb in a Pomodoro Sprint or Away Getting Coffee?

Turns out, you can by creating an XML file and adding a setting in your local registry. How? The easy way is to download my script, change the custom presences that is predefined in the script and run it.

Download the script here and use PowerShell to control your presence using the Lync 2013 Client SDK described here

You can now control you custom presence states using PowerShell, if you have installed the SDK, using the Publish-SfBContactInformation.ps1 found on GitHub here with this syntax

 
Publish-SfBContactInformation -CustomActivityId 1 -PersonalNote "Getting Stuff Done" -Location "@HomeOffice"

You are now ready to use this in a Pomodoro context, read how to get started with the open source PowerShell based Pomodoro timer here: https://msunified.net/2013/11/25/lock-down-your-lync-status-and-pc-notifications-using-powershell/

Share this:

Like Loading.

37 thoughts on “ How to set custom presence states in Skype for Business on your Windows machine ”

vairckof says:

Thanks for ur guide, really helpful.
Firstly, I tried with ur custome statuses and it worked! However, I wanted to change the statuses and customize them from myself. I modified the ps1 file, delete the “_CustomePresence” path and the system variables created but it never worked again 😦
Any idea?

Ståle Hansen says:

Did you replace it with your own path? Is the xml stored there? If you tried away status, that will break cyst om presence states. If all looks good. Send me your code in my contact field and I’ll take a look

vairckof says:

Thank you very much for your quick reply! I think the problem was I added many statuses. I have tried with just four custom statuses and it worked again 🙂 Is there any limit?
I have really appreciated your attention.
Best,

Ståle Hansen says: Yep. Four is the limit :) Randy says:

This is fantastic and very helpful – thank you so much. Three things: 1) FYI – for the step where it says to execute .\Set-CsCustomPresence.ps1…, I had to remove the “Cs” part so that name matched the downloaded file Set-CustomPresence.ps1. Just mentioning if it might help someone else out. 2) All worked great when I ran this in Windows 8 (once I changed access to unrestricted). But, when I ran it in Windows 10 Enterprise, I get 4 messages that indicate: Set-ItemProoperty : Cannot find path
‘HKLM:\SOFTWARE\Policies\Microsoft\Office\15.0\Lync’ because it does not exist. I don’t know what to do to try to fix this – any suggestions? 3) Is there a limit for how many characters the status values can be? I kept mine down to 17 or less (based on your examples), but I’m curious to know if there is some boundary since a few more would be helpful. Again, thank you! Hoping I can get it to work on the Windows 10 machine.

Ståle Hansen says:

Hi, thanks for your feedback. It works fine om my Windows 10 machines, not sure why it will not work on yours, it is also tested with Office 2016 MSI and Office Pro Plus C2R. Maybe you could try the new app for custom presence and Pomodoro timer? that way you can get the presence statuses in and edit the xml file with your own statuses. https://msunified.net/2018/04/03/announcing-the-pomodoro-pc-app/

Sarah says:

Set-ItemProoperty : Cannot find path
‘HKLM:\SOFTWARE\Policies\Microsoft\Office\15.0\Lync’ because it does not exist. Mine was missing too. All you have to do is go into regedit.exe as admin and add the DWORD Lync manually.