Haiku #139
Is there a problem?
Then maybe diagnostic
Headers should be on.
Hey, everyone. Today marks the 139th in our series of daily Lync Server PowerShell haikus and in honor of the occasion (and because we couldn't think of anything else to write about) we decided to look up some interesting facts about the number 139. Here's what we found:
· 139 is the natural number following 138 and preceding 140.
OK, well, that's kind of interesting, though not totally unexpected. Let's see what else we can dig up:
· One hundred [and] thirty-nine is the 34th prime number, so it is divisible only by itself and 1. It is a twin prime with 137. Because 141 is a semiprime, 139 is a Chen prime. 139 is the smallest prime before a prime gap of length 10
Hmmm …. Well, obviously we knew that 139 was a Chen prime (duh!), but we weren't aware that 141 was a semiprime. So that's pretty cool, right? Oh, and how about this:
· [139] is the smallest factor of 64079, the smallest composite Lucas number with a prime index. It is also the smallest factor of the first nine terms of the Euclid–Mullin sequence, making it the tenth term.
We have to admit that we were a little skeptical about that: since when is 64079 a Lucas number in the first place? But it turns out that 64709 is a Lucas number:
2, 1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, 322, 521, 843, 1364, 2207, 3571, 5778, 9349, 15127, 24476, 39603, 64079, 103682, 167761, 271443, 439204, 710647, 1149851, 1860498, 3010349, 4870847, 7881196, 12752043, 20633239, 33385282
We stand corrected.
Other than that, well, 139 happens to be the atomic number of Untriennium, something that would be totally fascinating if Untriennium actually existed. (It remains a hypothetical and as-yet undiscovered element. Much like the author's bank account balance.)
Oh, and speaking of hypothetical elements, in researching this column, the author of today's haiku stumbled upon a Web site where you can ask homework questions like this one:
"Consider the hypothetical elements X and Y. Suppose the enthalpy of formation for the compound XY is 336 kJ/mol, the bond energy for X2 is 414 kJ/mol, and the bond energy for Y2 is 159 kJ/mol. Estimate the XY bond energy in units of kJ/mol."
OK, yes, that question is way too easy, but you get the idea. At any rate, the point is that you post the question and then indicate how much you're willing to pay for the answer (a minimum of $5). Experts (or at least so-called experts) in the field will read your question and, if you're willing to pay enough, will answer it for you.
Interesting, huh?
Note. On a totally unrelated topic, if anyone out there has any questions on Lync Server PowerShell, well ….
At any rate, we could go on and on and on about the number 139, except for one thing: we're more bored with this than you are. Therefore, let's switch gears and talk about something truly exciting: the CsDiagnosticHeaderConfiguration cmdlets!
Note: Get-CsDiagnosticHeaderConfiguration, New-CsDiagnosticHeaderConfiguration, Remove-CsDiagnosticHeaderConfiguration, and Set-CsDiagnosticHeaderConfiguration.
So what's so interesting about the CsDiagnosticHeaderConfiguration cmdlets? Well, for one thing Remove-CsDiagnosticHeaderConfiguration has 38 characters in its name, which is sort of, kind of, vaguely related to that whole 139 thing we tried to use earlier. Perhaps slightly more important than that (hey, we said perhaps) is this: Lync Server can be configured so that each SIP message sent in your organization includes an ms-diagnostic header. This header contains information that might be useful in troubleshooting connection issues or in reporting errors. For example, the diagnostic header might contain error codes that enable the client application to take a predetermined course of action should a problem arise.
Useful, right? Yes. On the other hand, diagnostic headers do contain some information (such as the FQDNs of all your SIP servers) that maybe you would just as soon people in the outside world don't have access to. For example, a diagnostic header might look something like this (emphasis added):
Warning: 309 lcs.microsoft.com "Message contents not allowed by policy"
ms-diagnostics: 16002;reason="Message contents not allowed by policy";source="atl-cs-001.litwareinc.com" ;appName="IIMFilter" Server: IIMFilter/4.0.0.0
This is where the CsDiagnosticHeaderConfiguration cmdlets prove to be useful. With these cmdlets, you can decide whether or not you want these diagnostic headers included on messages sent to the following users:
Users on external networks. If you'd rather not have users outside your firewall have access to these diagnostic headers, then leave the SendToExternalNetworks property set to its default value of False. If you're OK with sending these headers to people outside the firewall then set SendToExternalNetworks to True. For example:
Set-CsDiagnosticHeaderConfiguration –Identity global –SendToExternalNetworks $True
Unauthenticated users. By default, diagnostic headers are not sent to users unless those users have logged on to, and been unauthenticated by, Lync Server. You say you'd prefer that these users get diagnostic headers? No problem; just set the SendToOutsideUnauthenticatedUsers property to True:
Set-CsDiagnosticHeaderConfiguration –Identity global –SendToOutsideUnauthenticatedUsers $True
If you're wondering what else you can do with the CsDiagnosticHeaderConfiguration cmdlets, well, that's really about it: there are only two properties to manage. As you might expect, you can use the New-CsDiagnosticHeaderConfiguration cmdlet to create new diagnostic header settings at the site or the service scope (Edge Servers or Registrars only). Remove-CsDiagnosticHeaderConfiguration provides a way to remove any such settings you create at the site or the service scope, and Get-CsDiagnosticHeaderConfiguration lets you return information about your diagnostic header settings. For example, do you have any settings that allow you to send headers to external users? This command will tell you:
Get-CsDiagnosticHeaderConfiguration | Where-Object {$_.SendToExternalNetworks -eq $True}
What about sending headers to unauthenticated users? That's an easy one; that's what this command is for:
Get-CsDiagnosticHeaderConfiguration | Where-Object {$_.SendToOutsideUnauthenticatedUsers -eq $True}
And, of course, the pièce de résistance: a command that lets you know if you have settings that allow you to send headers to external users or unauthenticated users (or both). You know, a command like this one:
Get-CsDiagnosticHeaderConfiguration | Where-Object {$_.SendToExternalNetworks -eq $True -or $_.SendToOutsideUnauthenticatedUsers -eq $True}
Granted, some people won't find that half as exciting as the fact that 139 Juewa is a large and dark Main belt asteroid discovered in 1874. But we think it's pretty cool.
That's all for today. See you on Monday, when we explore number 140, an "… abundant number and a harmonic divisor number. It is the sum of the squares of the first seven integers, which makes it a square pyramidal number, and in base 10 it is divisible by the sum of its digits, which makes it a Harshad number."
OK, good point. In that case, we'll see most of you on Tuesday.