The Application

Endpoint cmdlets: like black

Caviar for Lync.

 

Many of you out there probably think that the author of today's haiku writes Lync Server PowerShell haikus for a living simply because no one would ever offer him a real job. Well, here's a little something for you naysayers to chew on: just yesterday afternoon, the author of today's haiku received an unsolicited email offering him a job with one of the leading importers of black caviar in the world. (Yep, the whole world.) The job in question is manager in charge of company operations, and the position sounds pretty enticing:

 

"If you are trying to find a stable and reliable friends to work with, and in case you are willing to add to the overall result of the company when transforming the positive image of the company, if you are trying to find a team that looks more like a family than an accidental mix of employees then it is the right place you won`t find once again if you reject the offer!"

 

Sounds good, huh? Except maybe for this part: If you are trying to find a stable and reliable friends to work with …. To be honest, the author of today's haiku wasn't sure how to parse that sentence: is he looking for stable, reliable friends, or he looking for two things: 1) a stable; and, 2) reliable friends? At any rate, he would love the chance to work with a team that looked more like a family than an accidental mix of employees.

 

Based, of course, on the fact that most families are assembled by sending random emails to total strangers.

 

Note. And yes, we know: they don't come any stranger than the author of today's haiku, do they? Yeah, yeah, yeah.

 

As for whether or not the author of today's haiku is even qualified for the job, well, among other things qualified applicants must be "MS Office compatible." That shouldn't be too much of a problem: for the most part the author of today's haiku is very compatible with Microsoft Office. He gets along great with Word and Excel, although he must admit that he has, on occasion, had words with PowerPoint.

 

Note. Any time he's in PowerPoint and clicks Exit, the application dutifully exits. At that point, a message box appears saying "Microsoft PowerPoint has quit unexpectedly. Restarting …." and PowerPoint starts up again. PowerPoint is like the dandelions of the software world: no matter what he tries he can never actually get rid of it!

 

Oh: and all qualified applicants must also be "stress-resistant." Is the author of today's haiku stress-resistant? Well, he's definitely not stain-resistant. But he's pretty sure that he is stress-resistant.

 

So is the author of today's haiku going to accept a job in the black caviar importing industry? Well, it's tempting; after all, the job does promise "… a lot of fun and career advancement potential of unbelievable character." However, there's one thing that his current job has the black caviar industry doesn't have: the Get-CsApplicationEndpoint and Move-CsApplicationEndpoint cmdlets.

 

To be honest, the CsApplicationEndpoint cmdlets probably aren't the best-named cmdlets in the world of Lync Server PowerShell. With Lync Server, the word "endpoints" conjures up images of devices or client applications such as Microsoft Lync. What do the CsApplicationEndpoint cmdlets have to do with devices or client applications? Nothing. Instead, the CsApplicationEndpoint cmdlets are used when working with contact objects associated with applications that run under Lync Server. Do this: open up Active Directory Sites and Services and, if necessary, click View and then click Show Services Node. Expand Services, expand RTC Service, and then click on Application Contacts. You should see several different contact objects, all with "names" like this:

 

{8c359fb6-dc2d-4c63-8b70-a558f083e12b}

 

Those are the contact objects that are associated with such things as dial-in access numbers, the Call Park service, and the Conferencing Announcement service. Those are all the contact objects that are returned when you run this command:

 

Get-CsApplicationEndpoint

 

So there you go: if you've ever wondered how you can get a list of the contact objects used by Microsoft Lync Server, well, just run the Get-CsApplicationEndpoint cmdlet.

 

Of course, you can do a few more things with the Get-CsApplicationEndpoint cmdlet than simply return all the Lync Server contact objects. For example, each contact object has an OwnerUrn property value that looks something like this:

 

urn:application:RGS

 

The OwnerUrn property provides information about the application associated with this contact object; for example, the preceding object is associated with the Response Group service (RGS). Want to see information about all the contact objects associated with the Response Group service? Then just run this command:

 

Get-CsApplicationEndpoint –ApplicationId RGS

 

Note. Why is the property named OwnerUrn but the parameter named ApplicationId? Well, there's probably a really good reason for that. We just don't have any idea what that reason could be.

 

Get-CsApplicationEndpoint also has a Filter parameter that allows you to filter on the Active Directory attributes of your contact objects. For example, each object has an Enabled attribute that indicates, well, that indicates whether or not the contact is currently enabled. How can you determine whether or not you have any contact objects that aren't enabled? Like this:

 

Get-CsApplicationEndpoint –Filter {Enabled –eq $False}

 

And here's a command that returns all the contact objects that have not been assigned a LineUri:

 

Get-CsApplicationEndpoint –Filter {LineUri –eq $Null}

 

You say you need to know if you have any contact objects that don't have a SIP address in the litwareinc.com domain. No problem:

 

Get-CsApplicationEndpoint –Filter {SipAddress –notlike "*@litwareinc.com"}

 

Etc., etc.

 

As for the Move-CsApplicationEndpoint cmdlet, this cmdlet lets you do two things: 1) move a contact object from one Lync Server Registrar pool to another; and/or, 2) move a contact object from Office Communications Server 2007 R2 to Lync Server. If you need to do this you might want to take a peek at this blog entry by Joseph Calev.

 

Note. Why should you look at that article? Because you can't just move a contact object without taking in to account the application that the contact object is associated with. This article provides much more detail on the entire process than we can cover in a haiku.

 

By the way, if you ever do need to move a contact object, don't worry: it's not exactly the most-complicated thing in the world. For example:

 

Move-CsApplicationEndpoint -Identity sip:endpoint1@litwareinc.com -TargetApplicationPool TrustPoolA.litwareinc.com

 

That should do it for the CsApplicationEndpoint cmdlets. As for the world of black caviar importing, well, the author of today's haiku has to give it some serious thought. After all, the job does pay $2,000 a month which – if his calculations are correct – is slightly above minimum wage!

 

Well, there's also that one month probation period in which you're expected to work full-time without being paid. But we're pretty sure that they won't simply make him work for a month and then tell him he isn't qualified for the job after all. Remember, this isn't just an accidental mix of employees, this is a family. And family would never take advantage of you, would they?

 

Hmmm ….