Hello? Are you there?
I guess you must have changed your
Hey, everyone. Well, the Summer Solstice has come and gone, we're now well into summer itself, and right now the temperature in Redmond is 52 degrees Fahrenheit, and raining. How does that compare with the rest of the world? Well, in Fairbanks, Alaska it's currently 54 degrees (and not raining). In cold, damp London, England it's 63 degrees (and not raining), even though it's evening time in London. Fargo, North Dakota? 63 degrees and sunny.
Depressing? Of course. After all, those of you in Base Arturo Prat, Antarctica have to deal with 6 degrees and snow. And in Nome, AK it's only 42 degrees and cloudy. So, all in all, those of us here in Redmond consider ourselves pretty lucky.
Even if it is 59 degrees in Minneapolis-St. Paul. And 53 degrees in both Hammerfest, Norway and Reykjavik, Iceland.
But you know what they say. No, we mean besides "The weather in Seattle really sucks." They say, "It's always a good day as long as you have Lync Server PowerShell cmdlets to play with." Which means it's going to be a really good day here, because we have plenty of Lync Server PowerShell cmdlets to play with.
Note. Who said "It's always a good day as long as you have Lync Server PowerShell cmdlets to play with"? To be honest, we don't recall right offhand. But we think it might have been Winston Churchill.
As noted, today promises to be an especially good day, partly because we have an all-hands meeting in less than two hours (hurray!) but also because today we're going to talk about the CsPresencePolicy cmdlets: Get-CsPresencePolicy, Grant-CsPresencePolicy, New-CsPresencePolicy, Remove-CsPresencePolicy, and Set-CsPresencePolicy.
If you're thinking to yourself, "What the heck is a presence policy?" well, don't feel bad: we're not totally convinced that anyone really knows what a presence policy is. Presence policies are used to manage two properties (that's right, just two):
MaxPromptedSubscriber. This is kind of an oddball one, but it works like this. By default, any time you are added to another user’s Contacts list a notification dialog appears on screen informing you of that you've been added to the list, and giving you the chance to, say, add the person to your own Contacts list, or maybe block that person from viewing your presence. Until you take action and dismiss the dialog box, each notification counts as a prompted subscriber. By default, Lync Server only allows you to have 200 of these undismissed dialog boxes at a time.
So would anyone ever have 200 undismissed dialog boxes at a time? Beats us. But that's the default value. If that seems too high (or too low) you can use the Set-CsPresencePolicy cmdlet to change the value (any integer value between 0 and 600, inclusive):
Set-CsPresencePolicy –Identity global –MaxPromptedSubscriber 500
So what happens if you exceed the number of allowed dialog boxes? Nothing really. You'll still get added to the other person's Contact list; you just won't see a notification that you've been added to the Contact list. If you set MaxPromptedSubscribers to 0 then you'll never see a notification when you're added to someone's Contact list.
MaxCategorySubscription. OK, this one's a little trickier, and probably a little more meaningful. When you add someone to your Contact list, you actually create a number of subscriptions that request presence information for that person: in particular, you ask to receive information for the other person's contact card, calendar data, notes, services, and current status.
Got that? In other words, for each person on your Contact list, you create 5 category subscriptions.
So what does the MaxCategorySubscription property (which has a default value of 1000) do? It determines the maximum number of subscriptions that can be made to any one user account. Take Ken Myer, for example. Using the default value of 1000 subscriptions, that means that 200 people can receive presence information for Ken (1000 subscriptions divided by 5 subscriptions per Contact list equals 200). Does that mean that only 200 people can have Ken on their Contact list? No, a million people can have Ken on their Contact list if they want. But suppose 200 people have Ken on their Contact list, which means his category subscriptions are maxed out. What happens if Pilar Ackerman tries to become the 201st person to add Ken to her Contact list?
Two things happen. First, Ken will be added to Pilar's Contact list; there's no problem there. However, Pilar will not receive presence information for Ken; instead, she'll simply see a message stating the presence data is not available because Ken has reached his maximum number of followers. Ken will still be a valid contact; Pilar just won't know whether his status is Available, Away, or Do Not Disturb.
Now here's the tricky part. Suppose someone other than Pilar, someone who also has Ken on their Contact list, logs off of Microsoft Lync. Well guess what? That means that only 199 people are currently subscribed to Ken's account. In turn, that means that Pilar will now start receiving Ken's presence information: she's now number 200 on the list rather than number 201. Remember that guy who logged off of Lync? Well, if he logs back on, now he won't see Ken's presence information. Why not? Because there are already 200 subscribers ahead of him. It's first-come, first-served.
And yes, we know. But if you think about it for a bit, it will start to make sense. For example, suppose you want to use instant messaging but you don't want people exchanging presence information. That's fine; just set MaxCategorySubscription to 0:
Set-CsPresencePolicy –Identity global –MaxCatgeorySubcription 0
With that command you can still add people to your Contact list, but you won't be able to view their presence information.
Of course, maybe there are just certain people – for example, your executives – who don't want their presence information shared with the world. That's fine: that's why presence information is wrapped up in a policy instead of configuration settings. If Ken Myer is your CEO and he doesn't want his presence information shared with anyone all you have to do is create a new presence policy and set the MaxCategorySubscription property to 0:
New-CsPresencePolicy –Identity "ExecutivePresencePolicy" –MaxCatgeorySubcription 0
And then simply use the Grant-CsPresencePolicy cmdlet to assign that policy to the appropriate users:
Grant-CsPresencePolicy –Identity "Ken Myer" –PolicyName "ExecutivePresencePolicy"
That's all you have to do.
And that's all we have to do, too, at least for now. (But don't worry: we'll be back tomorrow.) In the meantime, the temperature here in Redmond has risen all the way to – uh, 52 degrees. But hey, it's only 48 degrees in Angmagssalik, Greenland. Bet you Greenlanders really wished you lived here, don't you?