Lock down your Lync status and PC notifications using PowerShell

PomodoroRecently I wrote a blogpost on Control your Lync presence during a Pomodoro Sprint using PowerShell. This awesome script uses a timer and the Lync SDK to lock down Lync for 25 minutes while I get some real work done. The only thing I did not find out was how to suppress is Outlook popups and other notifications.

Thanks to a great tip by MVP Olav Tvedt i found out that you can set your laptop in presentation mode using the commandline tool presentationsettings

  • PresentationSettings /start
  • PresentationSettings /stop
  • Works from PowerShell as well

Using the script on a desktop

Apparently PresentationSettings is not installed on desktop computers by default. Searching the net I found a post by MVP Robert Sparnaaij where he described that you can use registry to enable this feature on desktop computers as well: http://www.msoutlook.info/question/380

If you save the below text to a .reg file and run it you will add the settings necessary to enable PresentationSettings and you are good to go

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\MobilePC\MobilityCenter]
"RunOnDesktop"=dword:1

[HKEY_CURRENT_USER\Software\Microsoft\MobilePC\AdaptableSettings]
"SkipBatteryCheck"=dword:1

; WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall Windows. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

Download the script and check out how I use the Pomodoro Technique with Lync and PowerShell here: https://msunified.net/2017/08/23/set-yourself-unavailable-with-this-open-source-powershell-based-pomodoro-timer/