Haiku #91

Three things you can count

On: Death, taxes, and, of course,

Trusted app endpoints.


Before we begin, we should remind U.S. citizens that today is "Tax Day," and your federal income tax return must be postmarked no later than midnight tonight. What happens if you don't pay your taxes? Well, if you're a big multinational corporation, then the government will feel so bad about even suggesting that you might have to pay taxes that it will waive all your taxes completely and send you a big batch of homemade chocolate chip cookies. And if you're not a big multinational corporation? Then you'll be thrown in debtor's prison, where you'll be fed nothing but bread and water until your seven-year-old daughter can get a job in a sweatshop and make enough money to pay your taxes and free you.


Note. In the spirit of the U.S. Congress, we should clarify that the preceding statements were not intended to be factual. Which is good, because they aren't the least bit factual; in fact, they are completely infactual.


Or unfactual. Whichever you prefer.


So what if you haven't filed your income tax return yet? Should you drop everything and do so? No, absolutely not. The Internal Revenue Service recommends that you first finish reading today's Lync Server PowerShell haiku, and then worry about your taxes. After all, the IRS understands better than anyone the importance of setting priorities. If you have other things to do then go ahead and take care of those things, and then finish off your tax return when you get the chance.


Note. The preceding statements were also not intended to be factual. But if you know anything about the IRS then you already knew that, didn't you?


Let's try something a little different here; let's show you a statement that actually is factual: If you want to be able to route calls to a trusted application, then you need to learn a little something about the CsTrustedApplicationEndpoint cmdlets (Get-CsTrustedApplicationEndpoint, New-CsTrustedApplicationEndpoint, Remove-CsTrustedApplicationEndpoint, and Set-CsTrustedApplicationEndpoint). And in today's haiku, we'll give you a little insight into how you can do just that.


Note. Good question: what is a trusted application? Well, without getting too technical, a trusted application is an application that runs as part of Lync Server even though it's not built into Lync Server itself. To put it in more familiar terms, it's kind of an app (or at least a trusted app) for Lync Server.


The basic idea is that after you set up and configure a trusted application, you can then use the CsTrustedApplicationEndpoint cmdlets to assign an "endpoint" to that application. As it turns out, a trusted application endpoint is simply an Active Directory contact object that lets you route calls to the trusted app. For example, here's a command that creates a new trusted application endpoint (i.e., a new contact object) associated with a trusted application with the ID SelfHelp:


New-CsTrustedApplicationEndpoint -ApplicationId SelfHelp -TrustedApplicationPoolFqdn TrustPool.litwareinc.com -SipAddress sip:selfhelp@litwareinc.com –LineUri TEL:+12065550712 –DisplayName "Self-Help Phone Line" –DisplayNumber "(206)555-0712"


As you can see, there's nothing very fancy going on here. We have standard parameters like SipAddress and LineUri that let us assign a SIP address and a phone number to the contact object; we also have parameters like DisplayName and DisplayNumber that provide a more user-friendly way to display the endpoint ID and phone number. And, of course, we have the ApplicationID parameter, which specifies which trusted application the new contact object should be associated with; and TrustedApplicationPoolFqdn, which is the trusted pool where the application resides. Note that you can't create a trusted application endpoint unless the application and the pool already exist. For example, if you try to associate an endpoint with a non-existent application you'll get an error message like this one:


New-CsTrustedApplicationEndpoint : The application "urn:application:SelfHelp" does not exist in the pool "TrustPool.litwareinc.com". Use Get-CsTrustedApplication to see the available applications or New-CsTrustedApplication to add a new one.


Assuming you can create the application endpoint, you can then use Get-CsTrustedApplicationEndpoint to return information about that object. What's really nice is that the Get-CsTrustedApplicationEndpoint cmdlet makes it easy for you to return this information based on the endpoint Identity or on the application Identity. In other words, you could return the data for a specific endpoint using a command like this one:


Get-CsTrustedApplicationEndpoint -Identity "sip:selfhelp@litwareinc.com"

Or, you could get back this same information by returning all the endpoints associated with the SelfHelp application:


Get-CsTrustedApplicationEndpoint -ApplicationID "SelfHelp"


Nice, huh? And, of course, you can use Set-CsTrustedApplicationEndpoint to modify the properties of an existing contact object, or use Remove-CsTrustedApplicationEndpoint to delete an existing contact object. For example, this command disables all the trusted application endpoints currently in use in your organization:


Get-CsTrustedApplicationEndpoint | Set-CsTrustedApplicationEndpoint –Enabled $False


And this command deletes all the disabled endpoints:


Get-CsTrustedApplicationEndpoint | Where-Object {$_.Enabled –eq $False} | Remove-CsTrustedApplicationEndpoint


Maybe it's not quite as much fun as filing your income taxes. But it's close.


Note. Here's a piece of trivia for you. Tax Day in the U.S. is supposed to be on April 15th, unless April 15th falls on a weekend or a holiday. So then why is Tax Day being held on April 18th this year?


We're glad you asked us that question. As it turns out, Emancipation Day (the day on which Abraham Lincoln signed a proclamation that released some 3,000 slaves in Washington, DC) is an official holiday in the District of Columbia. Emancipation Day is celebrated on April 16th, but because April 16th was a Saturday, this year's Emancipation Day was celebrated on Friday, April 15th. That made April 15th a holiday in Washington, DC, and thus pushed Tax Day out to April 18th.


Where would you guys be without the Lync Server PowerShell daily haiku, huh? See you tomorrow.





Skip to main content