• New Articles: Working with Microsoft Lync Registry Settings

     

    When the registry was first introduced in its current form in the Microsoft Windows 95 operating system, everyone at Microsoft was told “DO NOT tell users to touch anything in the registry. Ever.” We then proceeded to tell people that in some cases the only way to change something was to modify the registry.

     

    Flash forward 16 years to 2011. The message from Microsoft today is “DO NOT tell users to touch anything in the registry. Ever.” Hey, at least we’re consistent.

     

    But, again, there are exceptions. One of those exceptions happens to be if you’re writing Windows PowerShell scripts. In the set of articles Working with Microsoft Lync Registry Settings, we show you how to change Microsoft Lync 2010 settings by using scripts to modify the registry. Keep in mind that you can also modify these settings directly from the client, but if you’d like to use a script instead, this is how you do it.

     

    http://blogs.technet.com/b/csps/archive/2011/06/15/regintroduction.aspx

     

     

  • Haiku #133

    But there is no joy

    In Mudville: where are the A

    V Edge cmdlets?

     

    Last night the author of today's haiku and his son went to watch the Seattle Mariners take on the Los Angeles Angels of Anaheim. (Who still retain their title of "team with the dumbest name in all of sports.") Are we going to report back the highlights of the game? Of course we are:

     

    ·         The woman with the world's smallest head sat in front of the author and his son. Which, if anyone is going to sit in front of you, the woman with the world's smallest head is a good choice.

    OK, fine: her head wasn't that small. It just looked small because she was wearing a sweater with these big, huge shoulder pads.

    ·         The author of today's haiku defeated his son in the game-long "predict what the next hitter will do" contest. (Which is pretty much what the name implies: before the hitter steps into the batter's box you have to predict what he will do during that at-bat; for example, "He will single to left centerfield, and the runner on first will have to stop at second.") Included in the author's uncanny predictions: his spot-on pronouncement that Greg Halman would hit a home run (his first-ever Major League home run) to centerfield.

    ·         The author's son correctly predicted that the green boat would win the hydroplane race, although the ending of the race remains controversial. The red boat, the one picked by the author of today's haiku, had broken free of the pack and was on its way to a sure win when a giant whale lifted the green hydroplane onto its back and carried the green boat to victory. The author of today's haiku protested, but his son retorted that there's nothing in the hydroplane racing rule book that says a giant whale can't pick up your boat and carry it across the finish line. As it turns out, he was right.

    ·         The people in front of the author and his son spent their entire game fiddling with their cell phones; they also ate sushi, teriyaki, crepes, and Caesar salad. The author and his son did not see anyone eat a hot dog.

    ·         The author's son correctly picked Semi-Charmed Life by Third Eye Blind as the song that would be played – in its entirety! – later in the game. The author of today's haiku picked Good Lovin' by the Rascals; big mistake.

    ·         Fortunately, the author of today's haiku redeemed himself by knowing that Deep Purple released the song Smoke on the Water in 1972. Well, OK, he didn't actually know that Deep Purple released the song Smoke on the Water in 1972; he guessed that. But the author and his son are highly competitive, and a win is a win. And at least the author didn't have to rely on a giant whale to tell him when the song was released.

    What's that? Who won the game? Good question. Probably someone did. With so much else going on we didn't have time to actually watch the game, you know.

     

    Note. At one point the author's son, in reference to trivia contests, blooper videos, guess-how-many-times-Felix-Hernandez'-baseball-card-will-appear-on-the-screen competitions, etc., etc., asked, "Can't anyone sit for even 30 seconds without having to be entertained?" The answer, of course, is no, they can't. Which is why you were encouraged to get up and dance, or snap a picture with your cell phone and see if it can be displayed on the jumbo video screen, or guess which hat the ball is under, or ….

     

    As near as the author of today's haiku could tell, about the only thing that they didn't do in between innings or whenever there was a pitching change was talk about the CsAVEdgeConfiguration cmdlets: Get-CsAVEdgeConfiguration, New-CsAVEdgeConfiguration, Remove-CsAVEdgeConfiguration, and Set-CsAVEdgeConfiguration. How could they let us know that Justin Smoak's favorite snack is beef jerky, yet not tell us about the CsAVEdgeConfiguration cmdlets? We have no idea. But we'll take care of that matter right now.

     

    Note. Actually, there's a chance that they did tell everyone about the CsAVEdgeConfiguration. For better or worse, however, the author and his son had seats at the end of the row, which meant they had to stand up 3 or 4 times an inning in order to let people in or out. Among other things, people can no longer sit through an entire half inning of baseball without having to get up and go – well, somewhere.

     

    So what exactly are the CsAVEdgeConfiguration cmdlets? Well, as you probably know, A/V Edge servers enable audio and video traffic to be exchanged across your firewall. In turn, this allows users to access Microsoft Lync Server 2010 from across the Internet, and to exchange audio and video data with users who have logged onto the system from inside the firewall. The AV Edge server configuration settings can be assigned at the global scope, the site scope, and the service scope. (Which service? The Edge Server service, of course.) The A/V Edge configuration settings enable administrators to manage the amount of time that user authentication is valid before it must be renewed, and to limit the amount of bandwidth that can be used by a single user or a single port.

     

    Not quite as exciting as the hydroplane races, but way better than picking the song that will be played – in its entirety! – later in the game.

     

    Because there are so few parameters available for AV Edge servers, using these cmdlets is incredibly easy. For example, suppose you want to limit the global Edge server settings to the following: no more than 5000 kilobits per second of bandwidth allocated to a single port, and no more than 8000 kilobits per second of bandwidth allocated to a single user. How do you do that? Why, like this, of course:

     

    Set-CsAVEdgeConfiguration -Identity global –MaxBandwidthPerPortKb 5000 –MaxBandwidthPerUserKb 8000

     

    That's really all there is to it. If you want to allow an authentication token to be used for 24 hours before it expires then use a command like this:

     

    Set-CsAVEdgeConfiguration -Identity global –MaxTokenLifetime 1.00:00:00

     

    With that syntax, 1.00:00:00 represents 1 day, 00 hours, 00 minutes, and 00 seconds. What if you wanted to limit the token lifetime to 12 hours? Then you'd use syntax like this:

     

    Set-CsAVEdgeConfiguration -Identity global –MaxTokenLifetime 12:00:00

     

    It's that easy.

     

     

    Needless to say, you can use the New-CsAVEdgeConfiguration cmdlet to create new AV Edge settings (at the site or service scope); use Remove-CsAVEdgeConfiguration to remove any existing AV Edge settings; and call Get-CsAVEdgeConfiguration any time you want to review those existing settings. This command returns all your AV Edge settings:

     

    Get-CsAVEdgeConfiguration

     

    Not fancy enough for you? OK, well, this command tells you whether you have any settings where the token lifetime is greater than the default value of 8 hours:

     

    Get-CsAVEdgeConfiguration | Where-Object {$_.MaxTokenLifetime –gt "08:00:00"}

     

    And this one lets you know if any of your settings allow any one user fewer than 10000 kilobits per second of bandwidth (also a default value):

     

    Get-CsAVEdgeConfiguration | Where-Object {$_.MaxBandwidthPerUserKb –lt 10000}

     

    Let's be honest: would your average baseball fan prefer to know how to retrieve information about their AV Edge server configuration settings, or would your average baseball fan prefer to know that Jack Wilson's favorite type of food is Mexican? That's what we thought. But like we said, for some reason the CsAVEdgeConfiguration cmdlets didn't come up during last night's game. No wonder attendance was only 19,321: you have to give the people what they want.

     

    Note. 19,321? To quote the old baseball cliché, apparently a whole bunch of people came disguised as empty seats.

     

    Oh, and in case the suspense is killing you, the Mariners won the game 3-1. The score was tied 0-0 with two outs in the bottom of the 7th when Carlos Peguero hit a ground ball up the middle that looked like it would end the rally. Right before the shortstop could make the play, however, the ball hit second base and ricocheted into the outfield and two runs scored.

     

    Either that or the ball hit a giant whale and ricocheted into the outfield. Regardless, two runs scored and the Mariners won.

     

    See you tomorrow.

     

     

     

     

     

     

  • Working with Microsoft Lync Registry Settings

     

    Remember the registry? Of course you do: the registry was first introduced in Windows 3.1 and now, almost 20 years later, the registry is still very much alive and kicking. We're the first to admit that the registry hasn't always been the most-beloved piece of software that Microsoft ever created, but it still maintains its importance as a central storehouse for both operating system and application configuration information.

     

    And yes, as a matter of fact, that does include configuration information for Microsoft Lync 2010. There's no doubt that the client policy settings introduced in Microsoft Lync Server 2010 give administrators considerable centralized control of the behavior of Microsoft Lync; for example, an administrator can configure a policy that enables free/busy information to be included in your presence information, or a policy that prevents users from including emoticons in any instant messages that they send or receive. That's nice, and there are other policy settings that control such things as the display of the Activity Feeds tab, the ability of users to save instant message transcripts, and whether or not a disclaimer appears in the Conversation Window each time you participate in a new instant messaging session.

     

    That said, there are many other Lync settings that are not available as client policy settings; instead, they're available only as user preferences. What does that mean? That simply means that the users can decide for themselves whether or not they want to enable a feature. For example, there happens to be a user preference that determines whether or not Microsoft Lync automatically starts each time the user logs on to Windows. Who controls that setting? The user does, and by doing nothing more complicated than selecting (or deselecting) a checkbox in the Options dialog box:

     

     

    So what happens when a user enables (or disables) one of these user preferences? Well, in many cases, that information is recorded in the registry. For example, if you enable the option Automatically start Lync when I log on to Windows then this registry value gets set to 1:

     

    HKEY_CURRENT_USER\Software\Microsoft\Communicator\AutoRunWhenLogonToWindows

     

    And if you disable that setting? Then that same registry value will be set to 0. Each time you start Lync, the application reads these values from the registry and then configures itself accordingly.

     

    In other words, many of the Lync user preferences rely on values stored in the registry. So does that mean that you're thinking what we're thinking?

     

    Oh. Well, that's definitely not what we were thinking. We were thinking this: if preference information is stored in the registry, that means that you could use a Windows PowerShell script to retrieve the values of those registry-based settings. In fact, you could even use a Windows PowerShell script to change the values of those settings.

     

    That's what we were thinking.

     

    Of course, by now you're thinking, "Why would I even want to do that?" Well, imagine this scenario. A user calls you up and tells you that "Microsoft Lync used to start up every time I logged into Windows and now it doesn't. Why not?"

     

    The most obvious reason is because he or she has cleared the Automatically start Lync when I log on to Windows option. But how can you be sure that this is what happened? One way, of course, is to ask the user. But another way is to run a script like this one, a script that retrieves the value of AutoRunWhenLogonToWindows from the computer atl-ws-001.litwareinc.com:

     

    $computer = "atl-ws-001.litwareinc.com"

     

    $registry = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("CurrentUser", $computer)

    $key = $registry.OpenSubKey("SOFTWARE\Microsoft\Communicator", $True)

     

    Write-Host "Automatically start Lync when I log on to Windows:",`

        ($key.GetValue("AutoRunWhenLogonToWindows",$null))

     

    If this script returns a 0, that means that Automatically start Lync when I log on to Windows has been disabled; in turn, that's probably why Lync is no longer starting up whenever the user logs on to Windows. If the script returns a 1, then you know that this option actually is enabled, which means that something else must be preventing Lync from auto-starting. Either way, you've managed to get this information without having to guide the user through the Lync UI, and without running the risk of the user accidentally clicking something else and making the problem even more complicated than it was before.

     

    But wait: it gets even better. If you want to, you could even run a script that modifies the registry and thus re-enables the setting:

     

    $computer = "atl-ws-001.litwareinc.com"

     

    $registry = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("CurrentUser", $computer)

    $key = $registry.OpenSubKey("SOFTWARE\Microsoft\Communicator", $True)

     

    $key.SetValue("AutoRunWhenLogonToWindows",1,"DWORD")

     

    Now, admittedly, we typically don't recommend that people make changes to an application by modifying the registry; after all, if you assign the wrong value to the wrong setting, well …. But keep in mind that we're not saying that you have to do this; we're just saying that you could do this. Being able to run a script that returns a considerable amount of information about how Microsoft Lync has been configured could be extremely useful for administrators and help desk personnel. Being able to run a script that modifies one of those settings could be equally valuable. For example, imagine a script that you could run after installing a new copy of Microsoft Lync, a script that would immediately configure that copy of Lync with your organization's preferred settings. Useful? It sounds useful. But that's your call.

     

    We should also point out that modifying a registry value does not prevent the user from going in and changing things back. For example, suppose you set AutoRunWhenLogonToWindows to 1, thus configuring Lync to automatically start any time the user logs on to Windows. What's to prevent the user from simply opening up the Options dialog box and disabling auto-start? Absolutely nothing. After all, that's how user preferences work.

     

    Note. This is as good a time as any to mention that there are a few cases where policies and preferences overlap. For example, users can decide for themselves if they want to use emoticons in instant messages; however, there's also a client policy setting (DisableEmoticons) that administrators can use to prevent users from employing emoticons. So what happens when worlds collide; that is, what happens if a user has enabled the use of emoticons but an administrator has disabled the use of emoticons?

     

    Actually, there's a very simple answer to that: the policy set by the administrator always wins. Always. If an administrator uses a client policy to disable emoticons then it doesn't matter what the user has set in the Options dialog box and it doesn’t matter what value might be configured in the registry. And, while there might be one or two privacy-related exceptions, after a setting has been configured via a policy, the user will no longer have the option of changing that setting. In this case, for example, the Show emoticons in instant messages option will be grayed-out and will no longer be available to the user.

     

    As we hinted at a moment ago, the purpose of this series of articles is to introduce some of the registry settings used by Microsoft Lync and to explain how those settings relate both to the Lync user interface and, in some cases, to Lync Server client policies. Our goal here is purely educational: we're just reporting back the things we discovered while exploring Lync and the Lync registry settings. Do these articles contain useful nuggets of administrative information? That's something you'll have to decide for yourself. You know what they say: we report, you decide.

     

    Here are the Lync features that we've managed to map to the registry, at least up to this point in time:

     

    ·         Allow Microsoft to collect information about how I use Lync

    ·         Always on Top

    ·         Automatically start Lync when I log on to Windows

    ·         Display my Out of Office Information to contacts in my Friends and Family, Workgroup, and Colleagues privacy relationships

    ·         File Transfer Save to

    ·         Hide the Notification Balloon

    ·         Join meeting audio from

    ·         Keep sounds to a minimum when my status is Busy

    ·         Keep sounds to a minimum when my status is Do Not Disturb

    ·         Last Dialed Number

    ·         Lync Language

    ·         Minimize to the notification area instead of the task bar

    ·         Mute incoming IM alert sounds when viewing an IM conversation

    ·         Play sounds in Lync (including ringtones for incoming calls and IM alerts)

    ·         Lync Product Version

    ·         Prompt me before joining to confirm or select another audio source

    ·         Show an alternating background color for messages in the conversation window

    ·         Show emoticons in instant messages

    ·         Show Lync in foreground when it starts

    ·         Show me as Away when my status has been Inactive for this many minutes

    ·         Show me as Inactive when my computer has been idle for this many minutes

    ·         Show photos of contacts

    ·         Show the Menu Bar

    ·         Turn logging on in Lync

    ·         Turn on TYY mode

    ·         Turn on Windows Event logging for Lync

     

    And here's a script that can return detailed information about Microsoft Lync and how it's been configured. As written, the script returns this information for the local computer. To retrieve this data from a remote computer, simply assign the name of that computer to the variable $computer. For example:

     

    $computer = "atl-ws-001.litwareinc.com"

     

    Here's the script:

     

    $computer = "."

     

    $registry = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("CurrentUser", $computer)

    $key = $registry.OpenSubKey("SOFTWARE\Microsoft\Communicator", $True)

     

    $value =$key.GetValue("ShowEmoticons",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Show emoticons: $value"

     

    $value =$key.GetValue("ShowColorBand",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Show an alternating background color for messages in the" `

        "conversation: $value"

     

    $value =$key.GetValue("CEIPEnabled",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

     

    Write-Host "Allow Microsoft to collection information about how I use" `

        "Lync: $value"

     

    $value =$key.GetValue("EnableTracing",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Turn logging on in Lync: $value"

     

    $value =$key.GetValue("EnableEventLogging",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Turn on Windows event logging for Lync: $value"

     

    $value =$key.GetValue("MinimizeWindowToNotificationArea",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Minimize to the notification area instead of the task bar: $value"

     

    $value =$key.GetValue("AutoRunWhenLogonToWindows",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Automatically start Lync when I log on to Windows: $value"

     

    $value =$key.GetValue("AutoOpenMainWindowWhenStartup",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Show Lync in foreground when it starts: $value"

     

    $value =$key.GetValue("AutoRetriveOOFSettings",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Display my Out of Office information to contacts in my Friends" `

        "and Family, Workgroup, and Colleagues privacy relationships: $value"

     

    $value =$key.GetValue("ShowPhoto",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Show photos of contacts: $value"

     

    Write-Host "Show me as Inactive when my computer has been idle for this" `

        "many minutes:",($key.GetValue("IdleThreshold",$null))

     

    Write-Host "Show me as Away when my status has been Inactive for this" `

        "many minutes:",($key.GetValue("AwayThreshold",$null))

     

    $value =$key.GetValue("EnableTTY",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Turn on TTY mode: $value"

     

    $value =$key.GetValue("AllowOverridingDeviceAtJoinTime",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Prompt me before joining to confirm or select another audio" `

        "source: $value"

     

    $value =$key.GetValue("PlaySoundFeedback",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Play sounds in Lync (including ringtones for incoming calls" `

        "and IM alerts): $value"

     

    $value =$key.GetValue("suspendSoundWhenConversationWindowInForeground",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Mute incoming IM alert sounds when viewing an IM conversation: $value"

     

    $value =$key.GetValue("suspendSoundWhenBusy",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Keep sounds to a minimum when my status is Busy: $value"

     

    $value =$key.GetValue("suspendSoundWhenDND",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Keep sounds to a minimum when my status is Do Not Disturb: $value"

     

    $value =$key.GetValue("AlwaysOnTop",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Always on tops: $value"

     

    $value =$key.GetValue("DsBkgndMode",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Hide notification balloon: $value"

     

    $value =$key.GetValue("AlwaysShowMenu",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Show menu bar: $value"

     

    $value =$key.GetValue("ShowPhoto",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Show photos of contacts: $value"

     

    $value =$key.GetValue("JoinAudioConferenceFrom",$null)

    if ($value -eq 1) {$value = "Lync"}

    if ($value -eq 0) {$value = "Do not join meeting audio"}

    Write-Host "Join audio conference from: $value"

     

    Write-Host "File transfer Save to folder:",($key.GetValue("FtReceiveFolder",$null))

    Write-Host "Last Dialed Number:",($key.GetValue("LastDialedNumber",$null))

    Write-Host "Product Version:",($key.GetValue("ProductVersion",$null))

     

    $value =$key.GetValue("Language",$null)

    switch ($value) {

        1025 {$value = "Arabic "}

        1026 {$value = "Bulgarian "}

        1027 {$value = "Catalan "}

        2052 {$value = "Chinese - Simplified "}

        1028 {$value = "Chinese - Traditional "}

        3076 {$value = "Chinese Hong Kong "}

        1050 {$value = "Croatian "}

        1029 {$value = "Czech "}

        1030 {$value = "Danish "}

        1043 {$value = "Dutch "}

        1033 {$value = "English "}

        1061 {$value = "Estonian "}

        1035 {$value = "Finnish "}

        1036 {$value = "French "}

        1031 {$value = "German "}

        1032 {$value = "Greek "}

        1037 {$value = "Hebrew "}

        1081 {$value = "Hindi "}

        1038 {$value = "Hungarian "}

        1040 {$value = "Italian "}

        1041 {$value = "Japanese "}

        1042 {$value = "Korean "}

        1062 {$value = "Latvian "}

        1063 {$value = "Lithuanian "}

        1044 {$value = "Norwegian "}

        1045 {$value = "Polish "}

        2070 {$value = "Portuguese (Portugal) "}

        1046 {$value = "Portuguese (Brazil) "}

        1048 {$value = "Romanian "}

        1049 {$value = "Russian "}

        2074 {$value = "Serbian "}

        1051 {$value = "Slovak "}

        1060 {$value = "Slovenian "}

        3082 {$value = "Spanish "}

        1053 {$value = "Swedish "}

        1054 {$value = "Thai "}

        1055 {$value = "Turkish "}

        1058 {$value = "Ukrainian"}

    }

     

    Write-Host "Lync Language: $value"

     

    And what the heck: here's a bonus script, one that resets the Lync registry settings to their default values:

     

    $computer = "."

     

    $registry = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("CurrentUser", $computer)

    $key = $registry.OpenSubKey("SOFTWARE\Microsoft\Communicator", $True)

     

    $key.SetValue("PlaySoundFeedback",1,"DWORD")

    $key.SetValue("AllowOverridingDeviceAtJoinTime",1,"DWORD")

    $key.SetValue("MinimizeWindowToNotificationArea",0,"DWORD")

    $key.SetValue("suspendSoundWhenDND",1,"DWORD")

    $key.SetValue("AutoRetrieveOOFSettings",1,"DWORD")

    $key.SetValue("AlwaysShowMenu",[byte[]]@(0,0,0,0),"Binary")

    $key.SetValue("suspendSoundWhenConversationWindowInForeground",1,"DWORD")

    $key.SetValue("EnableTracing",0,"DWORD")

    $key.SetValue("ShowColorBand",1,"DWORD")

    $key.SetValue("EnableEventLogging",0,"DWORD")

    $key.SetValue("IdleThreshold",5,"DWORD")

    $key.SetValue("JoinAudioConferenceFrom",1,"DWORD")

    $key.SetValue("FtReceiveFolder","$env:userprofile\Documents\My Received Files","String")

    $key.SetValue("CEIPEnabled",0,"DWORD")

    $key.SetValue("DsBkgndMode",[byte[]]@(0,0,0,0),"Binary")

    $key.SetValue("EnableTTY",0,"DWORD")

    $key.SetValue("AwayThreshold",5,"DWORD")

    $key.SetValue("AlwaysOnTop",[byte[]]@(0,0,0,0),"Binary")

    $key.SetValue("AutoOpenMainWindowWhenStartup",1,"DWORD")

    $key.SetValue("suspendSoundWhenBusy",1,"DWORD")

    $key.SetValue("AutoRunWhenLogonToWindows",1,"DWORD")

    $key.SetValue("ShowEmoticons",1,"DWORD")

     

    Enjoy!

  • Keep sounds to a minimum when my status is Busy

     

     

    Registry locations

    HKCU\Software\Microsoft\Communicator\suspendSoundWhenBusy

    Allowed registry values

    ·         0 – Lync will not suppress sounds when your status is set to Busy

    ·         1 – Lync will suppress sounds when your status is set to Busy

    Registry value type

    REG_DWORD

    Default setting

    0: Sounds are not muted when your status  is set to Busy

     

    Let’s say you’re currently talking on the phone and your Microsoft Lync status has been set to Busy. Under those conditions, do you really want your computer to start chirping at you each time you get a new instant message, or each time one of your tagged contacts logs on or logs off? Well, maybe you do, and maybe you don’t. Either way, there’s a setting within Microsoft Lync that lets you decide whether or not you want sounds played any time you are Busy. You can find this setting on the Ringtones and Sounds tab in the Options dialog box:

     

     

    So is there another way to configure this setting? Of course there is: just modify the HKCU\SOFTWARE\Microsoft\Communicator\suspendSoundWhenBusy registry value. (Yes, for some reason the initial s is lowercase. Go figure.) If you want Lync to keep quiet any time you’re Busy then set this value to 1. If it’s OK for Lync to make noise from time-to-time while you’re Busy then set this value to 0.

     

    All in all, pretty simple and straightforward.

     

    The following PowerShell script shows how you can retrieve the current value of suspendSoundWhenBusy from the local computer. If you'd prefer to retrieve that information from a remote computer, set the value of the variable $computer to the name of that remote computer. For example:

     

    $computer = "atl-ws-001.litwareinc.com"

     

    That also seems pretty simple and straightforward, doesn't it?

     

    Here's the script that retrieves the suspendSoundWhenBusy value:

     

    $computer = "."

     

    $registry = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("CurrentUser", $computer)

    $key = $registry.OpenSubKey("SOFTWARE\Microsoft\Communicator", $True)

     

    $value =$key.GetValue("suspendSoundWhenBusy",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Keep sounds to a minimum when my status is Busy: $value"

     

    And here's a script that lets you change that value. In this case, the script tells Lync to suspend sounds any time you're busy; that's done by setting suspendSoundWhenBusy to 1. To allow sounds to play even when you're busy, set suspendSoundWhenBusy to 0:

     

    $key.SetValue("suspendSoundWhenBusy",0,"DWORD")

     

    Here's how you change the value:

     

    $computer = "."

     

    $registry = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("CurrentUser", $computer)

    $key = $registry.OpenSubKey("SOFTWARE\Microsoft\Communicator", $True)

     

    $key.SetValue("suspendSoundWhenBusy",1,"DWORD")

     

     

     

  • Show photos of contacts

     

     

    Registry locations

    HKCU\Software\Microsoft\Communicator\ShowPhoto

    Allowed registry values

    ·         0: Photos of yourself and all your contacts are not displayed in Microsoft Lync

    ·         1: Photos of yourself and all your contacts are displayed in Microsoft Lync

    Registry value type

    REG_DWORD

    Default setting

    1: Photos of yourself and all your contacts are displayed in Lync

     

    One of the cool new features found in Microsoft Lync 2010 is the ability to show not only your picture, but pictures of all your contacts as well. Assuming you and your contacts have all decided to allow your pictures to be shown, an instance of Microsoft Lync will look something like this:

     

    Like we said: pretty cool.

     

    But one of the other cool new features in Microsoft Lync is this: Microsoft Lync gives you a considerable amount of control over the things you see (or don't see) in the user interface. For example, suppose you don't want to see everyone's picture (including your own) in the Contact List. That's fine; one of the settings available in the Options dialog box is the Show photos of contacts checkbox:

     

     

     

     

    If you clear this checkbox then neither your photo nor the photos of any of your contacts will be shown in Lync:

     

    It's entirely up to you.

     

    We should probably point out that this does not prevent other people from seeing your picture; if you want to do that, you need to go back into the Options dialog box and select the option Do not show my picture

     

     

     

    You can even configure things so that you can see everyone's picture except yours. To do that, select Do not show my picture and leave Show photos of contacts selected. After you've done all that, no one (including you) will see your photo. But you'll still be able to see everyone else's photo (unless they, too have selected Do not show my picture):

     

     

     

     

    Another way to enable/disable the showing of photos within Microsoft Lync is to modify the HKCU\SOFTWARE\Microsoft\Communicator\ShowPhoto value in the registry. Before we show you how to do that, however, let's first show you a script that retrieves that value from the local computer. If you'd prefer to retrieve this value from a remote computer, simply set the value of the variable $computer to the name of that remote computer. For example:

     

    $computer = "atl-ws-001.litwareinc.com"

     

    Here's the script that lets you retrieve the value:

     

    $computer = "."

     

    $registry = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("CurrentUser", $computer)

    $key = $registry.OpenSubKey("SOFTWARE\Microsoft\Communicator", $True)

     

    $value =$key.GetValue("ShowPhoto",$null)

    if ($value -eq 1) {$value = "Yes"}

    if ($value -eq 0) {$value = "No"}

    Write-Host "Show photos of contacts: $value"

     

    And here's a script that sets the value of ShowPhoto. In this case, the script enables showing pictures of yourself and your contacts; that's done by setting ShowPhoto to 1. To suppress pictures of both yourself and your contacts, set ShowPhoto to 0:

     

    $key.SetValue("ShowColorBand",0,"DWORD")

     

    In other words:

     

    $computer = "."

     

    $registry = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("CurrentUser", $computer)

    $key = $registry.OpenSubKey("SOFTWARE\Microsoft\Communicator", $True)

     

    $key.SetValue("ShowPhoto",1,"DWORD")