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.

  1. Download the script from GitHub
  2. The default custom presence states are shown below
  3. To change the names you need to open the script and write your own presence states
    • Away does not work as a custom presence state, if you put that in no custom states will show up in the client
    • The presence states that works are: Online, Busy, and Do-Not-Disturb
  4. To run the script, just type the following in PowerShell in elevated mode from the location you saved it
    • .\Set-CsCustomPresence.ps1
    • It works for Lync and Skype for Business
    • It works for 64-bit and 32-bit office
    • It works for MSI installed Office and Click-to-Run Office
    • The xml file will get stored under c:\_CustomPresence\CustomPresence.xml if that is your systemdrive
  5. You need to sign out of the client and back in for the changes to take effect
  6. The presence states works in the following scenarios
    • On English Skype for Business clients for you and your colleagues
    • On Skype for Business clients in your local location retrieved using (Get-Culture).LCID
    • For everyone in your Colleagues relationship level as long as they are running a client language version specified above
    • If you want external contacts to see your custom presence state you need to elevate them as colleagues in the relationship pane
      • Understand that they will also see you as in a meeting, in a call, your note and your location as well
    • If you are in an environment with more than two languages for you Office deployment, make sure you add an LCID per language in the script

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/

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

  1. 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?

    • 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

      • 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,

  2. 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.

      • 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.

  3. I have another question. How we can get the ‘yellow’ icon beside our custom status?

      • Thanks for the feedback.
        Oh! It would be nice if we could do it. Hope somebody can come up with a resolution. I’ll keep my eyes open here.

  4. Hello Team,

    It is not working on my system and any of the custom statuses are not visible on the status screen.

  5. Is it possible to set a default status? I would like to have it at Do not Disturb, or at least Busy. It is very frustrating to have people inundate you the moment you come online.

      • Hi Ståle. Thanks for your prompt answer. I am of course aware of that possibility, but I have the SfB set to start automatically at Windows logon and would like to preset the startup status.

      • Struggling to run this on Office laptop. Get following error “The file is not digitally signed. You cannot run this script on the current system.For more information about running scripts and setting execution policy, see about_Execution_Policies at
        https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1”

        Any help highly appreciated as some custom status setting is becoming critical in current crisis scenarios when one has to work remotely all the time.

        • Hei, the code is provided as-is and is not signed. In order to run it you need to set the following PowerShell cmdlet: Set-ExecutionPolicy RemoteSigned

  6. The script works fine for me, until I need to restart Skype for Business. Do you have any ideas how to keep them persistent after a restart?

  7. I’m not able to find the script for this. Do you know if this has been moved or how I can find this?

Leave a Reply to meghnachandu Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.