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


You know, the mark of a truly great Lync Server PowerShell challenge is this: everyone who submits an answer gets it right, but everyone who submits an answer also has a different reason for why that's the right answer.

 

Note. Doesn't that sound like a really mediocre sort of challenge? Well, maybe. On the other hand, we invented the Lync Server PowerShell challenge, so we get to decide what's a great challenge and what's a mediocre challenge. And we've decided that last week's Lync Server PowerShell challenge was a great one.

 

So there.

 

As you might recall, last week we presented you with the following set of Lync Server PowerShell parameters and asked you which parameter was not like the others:

 

Set-CsUCPhoneConfiguration.PhoneLockTimeout

Set-CsConferencingConfiguration.ContentGracePeriod

Set-CsAddressBookConfiguration.SynchronizePollingInterval

New-CSRgsTimeRange.CloseTime

 

When we put this question together, we decided that New-CsRgsTimeRange.CloseTime was the odd man (parameter) out. Why? Well, all four parameters have something to do with time. Three of those parameters (Set-CsUCPhoneConfiguration.PhoneLockTimeout, Set-CsConferencingConfiguration.ContentGracePeriod, and Set-CsAddressBookConfiguration.SynchronizePollingInterval) are used to set time intervals. For example, if I want Lync Server Phone Edition phones to automatically lock themselves after 10 minutes of inactivity I could use a command similar to this one:

 

Set-CsUCPhoneConfiguration –Identity global -PhoneLockTimeout "00:10:00"

 

New-CsRgsTimeRange.CloseTime is different, however. This parameter doesn't set a time interval (such as 10 minutes, 30 minutes, 2 hours and 15 minutes). Instead, this parameter is used to specify an actual time of day, in this case the time of day when a Response Group workflow is no longer open for business. (That is, when all the agents have gone home and there is no one left to answer the phone.) For example, this command sets the closing time for a set of business hours to 1:30 pm (13:30 on a 24-hour clock):

 

$sundayHours = New-CsRgsTimeRange -Name "Sunday hours" -OpenTime "08:30" -CloseTime "13:30"

 

Everyone who submitted an answer to last week's challenge also selected New-CsRgsTimeRange.CloseTime; they just didn't always select that parameter for the same reason we did. For example, many people pointed out that CloseTime is the only required parameter in the list; the other three parameters are optional.

 

Note. Did we realize that when we posted this question? Let's put it this way: we think that the mark of a truly great challenge is one where the challenge organizers have no idea what they're talking about.

 

Several other people also pointed out that New-CsRgsTimeRange.CloseTime creates an in-memory-only object and can't be used to directly modify a Lync Server setting; that's not the case with the other three parameters, but is another case that we overlooked. Good job, guys.

 

With any luck, we have another great challenge awaiting you this week; check it out and see. Oh, and a special note this week to Makovec: we would love to fly to Europe and tell the SCCM team that they need to do a better job with their PowerShell support. No doubt the SCCM team will be very excited to have a couple of Lync Server PowerShell blog writers come in and tell them that they're doing everything all wrong.

 

Thanks to everyone who entered last week's challenge; we'll see you again next week.

 

Challenge Home

 

Skip to main content