You can now find your contact.
AB Web query.
This past week, a British journalist and self-proclaimed friend of Harry Potter author J. K. Rowling (or "Jo," as he calls her) reported on an alternate ending to the series that Rowling allegedly considered and then rejected. It's an … interesting … ending to say the least, one that involves everything from some weird time-reversal spell that turns Voldemort back into a little kid to Harry's wife, Ginny Weasley, turning herself into a bird of paradise rather than face the prospect of growing old.
Ornithological note. Apparently that was a good move on her part: birds of paradise live for about 30 years or so, meaning that Ginny Weasley won't have to worry about growing too terribly old.
At any rate, our first thought was to take this British journalist at face value and accept his story as the true alternate ending to the Harry Potter. (And who could blame us? After all, in this day and age, who has more creditability than a British journalist?) However, in doing a little investigative work on our own, we soon discovered that J. K. Rowling had also considered other possible endings for the series. Take this one for example:
In one potential ending, Harry and Voldemort are battling in the parapets high atop Hogwarts Castle. "I will avenge my father's death!" Harry cries. "Harry!" responds Voldemort. "I am your father!" And then Hermione blows up the Death Star.
Note. In case you're wondering, the Death Star didn’t come up much in the previous books/movies.
In another scenario that Rowling pondered, the battle against the Dark Forces has gone badly: Hogwarts is in ruins, and several minor, but lovable, characters are dead. Despondent, Harry is contemplating suicide: "I wish I had never been born!" he sobs. At that very moment, Dumbledore comes down from heaven and shows Harry that things would actually have been much worse if he'd had never been born. Reinvigorated, Harry defeats Voldemort and then rushes home to his family. The Wizard Building and Loan is saved, Dumbledore gets his wings, and everyone lives happily ever after.
Note. Well, everyone except Ginny Weasley, who gets eaten by a cat (one of the disadvantages to turning yourself into a bird). But, other than that, everyone lives happily ever after.
Here’s another one. The battle appears lost when Voldemort waves his wand and Harry bursts into flames. Ron grabs a bucket of water and throws it on Harry. That puts out the fire, but some of the water splashes on Voldemort and causes him to melt. Voldemort's hold on the Dark Forces is broken, evil is banished from the world, and everyone sings a catchy little song. And then, just to make sure this sort of thing never happens again, Hermione blows up the Death Star.
Now, admittedly, any one of those would make for a pretty good ending. However, our favorite alternate ending is this one: Harry and Voldemort are locked in mortal combat. Harry knows that the only way he can win this battle is to get help: he needs to get hold of Ron and Hermione. But how can he do that? After all, he doesn't know Ron and Hermione's SIP addresses. And yes, that information is kept in the Address Book server, but how does Harry know if he can even contact the Address Book server, let alone retrieve information from it? Just when things look their bleakest, Harry calls upon the Test-CsAddressBookWebQuery cmdlet to verify that he can contact the Address Book server. When the test succeeds, he uses the Address Book server to locate Ron and Hermione and sends them an instant message. Ron and Hermione arrive on the scene, blow up the Death Star, and everyone lives happily ever after.
Now, we know what you're thinking. You're thinking, "That's way too unbelievable. He's in the middle of a fight to the death, and we're supposed to believe that Harry Potter can run the Test-CsAddressBookWebQuery cmdlet? No way!"
Believe it or not, however, this isn't just your typical Hollywood smoke-and-mirrors. For example, let's assume that Harry has set up some health monitoring test accounts for his Lync Server Registrar pool. (As best we can recall, this was something he did do back in Harry Potter and the Prisoner of Azkaban.) Assuming he did set up these test accounts then he can verify his ability to connect to the Address Book server Web service by using a command as simple as this:
Test-CsAddressBookWebQuery –TargetFqdn "atl-cs-001.litwareinc.com"
Obviously anyone could find time to do something as simple as that regardless of whether or not you were in the middle of a fight to the death. And what if you wanted to know if the Address Book contained an entry for a particular user? That's also easy: all you need to do is tack on the TargetSipAddress parameter followed by the SIP address of the user you're looking for. For example, this command queries the Address Book server for the user sip:email@example.com:
Test-CsAddressBookWebQuery –TargetFqdn "atl-cs-001.litwareinc.com" –TargetSipAddress "sip:firstname.lastname@example.org"
If Ken Myer is in the Address Book you'll get back output similar to this:
TargetUri : https://atl-cs-001.litwareinc.com/groupexpansion/service.svc
TargetFqdn : atl-cs-001.litwareinc.com
Result : Success
Latency : 00:00:00.0605769
And if Ken Myer isn't in the Address Book then you'll get back something similar to this:
Result : Failure
Latency : 00:00:00
Error : Address Book Web service request has failed with response code
OK, but suppose Harry didn't set up test accounts for his pool. (Or, more likely, suppose Neville accidentally deleted those test accounts.) That's fine. As long as you have a user name and password, you can run Test-CsAddressBookWebQuery under alternate credentials, like so:
$cred1 = Get-Credential "litwareinc\kenmyer"
Test-CsAddressBookWebQuery -TargetFqdn atl-cs-001.litwareinc.com -UserCredential $cred1 -UserSipAddress "sip:email@example.com"
As you can see, we start off by using the Get-Credential cmdlet to create a PowerShell Credentials object for the user litwareinc\kenmyer. (That has to be a valid user name, and you must know – and supply – Ken Myer's password when creating this object.) We then need to pass that Credentials object as the parameter value for the UserCredential parameter, and pass Ken's SIP address as the parameter value for the UserSipAddress parameter.
And what if we wanted to look for a specific user? That's fine; simply include the TargetSipAddress parameter, just like we did before:
Test-CsAddressBookWebQuery -TargetFqdn atl-cs-001.litwareinc.com -UserCredential $cred1 -UserSipAddress "sip:firstname.lastname@example.org" –TargetSipAddress "sip:email@example.com"
It's so easy, even a Muggle could do it!
Some of you seem a little confused; after all, didn't we just do a haiku about testing the Address Book service a week or so ago? As a matter of fact, we did. However, in that case we used the Test-CsAddressBookService cmdlet, which tests the ability of a user to connect to an Address Book server and locate copies of the Address Book files which can be downloaded to the local computer. Test-CsAddressBookWebQuery, by comparison, tests the ability of a user to connect to the Address Book Web service. The difference? With the downloaded files approach, users search for contacts using a copy of the Address Book that has been copied to their local computer. With the Web service, users search for contacts by using the Web service to search the Address Book itself. There are two different ways to search the Address Book, which means we need two different cmdlets to test the Address Book service.
Note. How do you know which approach you (or your users) should employ when searching the Address Book? For information on that, take a peek at the client policy's AddressBookAvailability parameter.
At any rate, that should do it for today, and for this week: after all, it is Friday. If you haven't already done so, we'd encourage you to take some time this weekend and go see Harry Potter and the Deathly Hallows: Part II. It's not a bad movie, and the way it ends – with Harry, Thelma, and Louise driving off a cliff – well, trust us: we did not see that coming. Not at all.
See you Monday.