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


When you work on the Lync Server PowerShell blog, people tend to stop you all the time and ask the same question: is your blog truly promoting peace and harmony throughout the entire world? Needless to say, we always thought that the Lync Server PowerShell blog was promoting peace and harmony throughout the entire world, but we didn’t have any proof of that. But now we do. When he submitted his answer for last week’s challenge, Makovec noted that, the week before that, he wasn’t completely confident in his answer. Because of that, he sent the answer to his wife and asked for her opinion. A few seconds later she replied, and she agreed with him! That’s right: the first known instance of a husband and wife actually agreeing on something! Can any other Lync Server blog make the same claim?

 

Well, OK. But other than that, can any Lync Server blog make the same claim? We didn’t think so.

 

Speaking of last week’s challenge, that challenge also helped bring people together: in fact, everyone who submitted an answer submitted the same exact answer.

 

Note. Does that mean that maybe everyone got together and simply copied the same answer? Hmmm, we never thought about that …. But no: that wouldn’t be in the spirit of the Lync Server PowerShell blog, would it?

 

To quickly recap the story, last week we presented you with the following four cmdlet parameters (without the typo this time) and asked you which of those parameters was not like the others:

 

New-CsUCPhoneConfiguration.EnforcePhoneLock

New-CsCommonAreaPhone.SipAddress

New-CsClientPolicy.Description

New-CsExUmContact.SipAddress

 

The answer (as everyone already knows) is this: New-CsExUmContact.SipAddress. Why? Because this is a mandatory parameter: if you don’t include the SIP address you won’t be able to create a new Exchange UM contact. The other parameters are all optional; for example, if you don’t include the EnforcePhoneLock parameter you can still create a new collection of UC phone configuration settings. In that case, the EnforcePhoneLock property for this new setting will be set to the default value of True.

 

So how do you know which parameters are optional and which parameters are mandatory? Well, probably the easiest way is to look at the help topic for a given cmdlet. But if that seems a little humdrum, you can also run a command like this one:

 

Get-Command New-CsUCPhoneConfiguration | Select-Object -ExpandProperty ParameterSets | Select-Object -ExpandProperty Parameters | Select-Object

 Name, IsMandatory

 

Give that a try and see what happens.

 

And while you do that, we’re going to start working on our acceptance speech for the Nobel Peace Prize. What happens if you get done before we do? That’s OK; we have another challenge you can work on while we wrap up our speech.

 

 

Challenge Home

 

 

 

 

 

Skip to main content