One of These Things is Not Like the Others: Challenge 18: Answer


We're not totally sure what this means, but this week all the submissions for the last Lync Server One of These Things is Not Like the Others challenge ended up in our Junk Mail folders. That didn't happen with any of the previous challenges: those emails ended up in our Inboxes, just like they were supposed to. So does that mean Outlook didn't like this particular challenge? Does that mean that Outlook doesn't like the answers that were submitted for this particular challenge? To be honest, we don't know. We just found in interesting.


Note. Here's a true story. The authors of the Lync Server PowerShell blog once worked with someone who was both working at Microsoft and also attending Oxford University part-time. Any time he would send a message from his Oxford University email address, that message would go straight into the Junk Mail folder. So, see, we've been right all along: participating in the Lync Server PowerShell challenge is pretty much the same thing as attending Oxford University.


Oh, and here's another interesting note: when our former colleague first signed up to attend Oxford, Microsoft declined to pay his tuition assistance, telling him there was no such place as Oxford University.


At any rate, last week we presented you with the following four Lync Server PowerShell cmdlets (or maybe Oxford University presented you with the following four Lync Server PowerShell cmdlets; we always get ourselves and Oxford University mixed up) and asked you which of these cmdlets is not like the others:







Our answer, and the answer of most Oxford University graduates, is: Get-CsAnalogDevice. Why Get-CsAnalogDevice? Our reasoning was simple: it's the only one of the four cmdlets that doesn't support the LocalStore parameter.


Ah, good question: what exactly is the LocalStore parameter? Well, if you use the LocalStore parameter, that tells the cmdlet to retrieve Lync Server data from the local replica instead of querying the Central Management database for that same data. Why would you ever want to retrieve the locally-stored data rather than the latest, most up-to-date data that's found in the Central Management store? Well, as a general rule, you wouldn't: you'll almost always want to grab data from the Central Management store, which means you might live a long and happy life without ever using the LocalStore parameter.


That said, there can be times when it might be expedient to grab data from the local store. For example, you might be working on an Edge Server that doesn’t have access to the Central Management database. In a case like that, you might do some work using the data in the local store, and then rely on Lync Server replication to reconcile all the changes for you. In all honesty, however, those times will be few and far between, which means you shouldn't lose a lot of sleep worrying about how – or when – to use the LocalStore parameter. For the most part, just don't use the LocalStore parameter.


Both Aleksandar N. and David M. pointed out another way in which Get-CsAnalogDevice differs from the other three cmdlets: in the Lync Server PowerShell help for Get-CsAnalogDevice, the Syntax section only shows a single set of parameters. In other words:


Get-CsAnalogDevice [-Identity] <UserIdParameter>] [-Filter <String>] [-LdapFilter <String>] [-OU <OUIdParameter>] [-DomainController <Fqdn>] [-Credential <PSCredential>] [-ResultSize <Unlimited`1>] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-WarningAction <ActionPreference>] [-ErrorVariable <String>] [-WarningVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>]


By contrast, the other three cmdlets show two sets of parameters in the Syntax section:


Get-CsCpsConfiguration [-Identity <XdsIdentity>] [-LocalStore <SwitchParameter>]


Get-CsCpsConfiguration [-Filter <String>] [-LocalStore <SwitchParameter>]


Why? Well, when you see multiple parameter sets for a cmdlet, that simply means that you have multiple ways of specifying the Identity of the object you want returned. For example, with Get-CsCpsConfiguration you can retrieve the configuration using either the Identity parameter or the Filter parameter:


Get-CsCpsConfiguration –Identity site:Redmond


Get-CsCpsConfiguration –Filter "site:*"


That's not the case with Get-CsAnalogDevice, however. Yes, Get-CsAnalogDevice has a Filter parameter, but – alas – a Filter parameter is not necessarily the same as a Filter parameter. In the case of CsAnalogDevice, the Filter parameter doesn't just filter on the object’s Identity; instead, it provides a way for you to construct a query that can filter on any Lync Server Active Directory attribute supported by the analog device object. For example:


Get-CsAnalogDevice -Filter {DisplayName -eq "Building 14 Receptionist"}


Admittedly, it's sort of an arbitrary difference, but it's a difference nonetheless.


Note. And yes, this is the same Filter used by Get-CsUser and Get-CsAdUser. Good catch!


So there you have it. We're not sure why those answers were considered Junk Mail; they seemed pretty insightful to us, and had nothing to do with Viagra, bank account passwords, email from Oxford University, or any of the other things that typically show up in our Junk Mail folders. What will happen to submissions for this week's Lync Server PowerShell Challenge? There's only one way to find out: take a peek and the challenge, and send us your answer. We'll keep you posted.



Challenge Home