Read label before

Using: the CS AD

Domain cmdlets.

 

Last night the author of today's haiku faced a crisis: he turned on the TV, and couldn't find a basketball game to save his soul! (Yes, there was an NBA game on, but he wanted to watch real basketball.) Faced with the prospect of having to do something other than watch TV (fix those bookshelves he's been meaning to fix for over a year now, or maybe have a nice, thoughtful chat with the missus) he tried (and failed) to find something worth watching on his 500 channels of cable TV that costs him over $100 a month.

 

Now, back in the old days, that wouldn't have been a problem: if he couldn't find a sporting event worth watching he'd simply turn on the History Channel. But that was back in the days when the History Channel actually had something to do with history. Today – well, here are some of the shows regularly broadcast on the "History" Channel:

 

·         American Pickers

·         Ax Men

·         Extreme Marksmen

·         Ice Road Truckers

·         More Extreme Marksmen (!)

·         Pawn Stars

·         Sharpshooters (who apparently aren't also extreme marksmen)

·         Swamp People

·         Top Shot (for people who aren't sharpshooters or extreme marksmen)

·         UFO Hunters

 

All of these shows are so-called "reality shows," named because they depict real people doing real things (like Swamp People, which is all about people hunting alligators in the swamps of Louisiana). The author of today's haiku is, in general, not a big fan of reality shows, but considering the fact that nearly everything on TV is a reality show (go check out the nighttime schedule for the Food Network if you need proof of that) somebody must like them. And that got him to thinking: maybe there's a way to turn the Lync Server PowerShell blog into a reality show.

 

Note. Yes, coming up with a name for the show is a definite problem. His first thought was The Missing Lync, but he had no idea what a show like that would be about. So, OK, M doesn't work. How about N: The Nissing Lync? No, no good. Maybe O: The Oissing Lync? Yuck; that's even worse. Maybe P – well, never mind; he'll name the show later.

 

Now, you might not think that the Lync Server PowerShell blog would be interesting enough to be the setting for a reality show. (Unlike, say, Pawn Stars, which is about a family that runs a pawn shop.) But, believe it or not, a day at the Lync Server PowerShell blog is a day filled with excitement and intrigue. For example, just last week someone emailed us about a script that didn't work; it turned out that, in copying the script to the blog, one of the a's in the keyword param got deleted.

 

Note. How could that happen in copying and pasting from Notepad to the blog? Hey, based on the blog software we have to use we're surprised that any a's ever make it onto the page!

 

So what did we do about the missing a? Well, we went to the page containing the broken script, and we changed the incorrect word pram to the correct word param.

 

True story.

 

Anyway, the author of today's haiku will keep you posted on his efforts to turn the Lync Server PowerShell blog into a reality show. (And yes, now that you mention it, his managers would be happy if he'd first try to turn the Lync Server PowerShell blog into something resembling a real Lync Server PowerShell blog.) In the meantime, we need to talk about the subject of today's haiku: the CsAdDomain cmdlets (Disable-CsAdDomain, Enable-CsAdDomain, and Get-CsAdDomain).

 

Not that there's really all that much to talk about. The CsAdDomain cmdlets are kind of like the first aid kit that you're supposed to have in the trunk of your car: it's great to have them available, just in case, but all things considered, you're probably better off if you never have to use them. And, for most people, you probably never will have to use them; instead, those cmdlets are typically used only by the Lync Server installation program and, if all goes well with setup, you'll probably never need to run any of the CsAdDomain cmdlets.

 

Of the three, Get-CsAdDomain is the cmdlet you're most likely to run. As you probably know, before you can install Lync Server you need to prepare your Active Directory domain (hence the Domain Prep stage of Lync Server deployment). What does it mean to "prepare your Active Directory domain?" Well, for the most part, it means extending the Active Directory schema to allow for the addition of attributes specific to Lync Server, as well as assigning the required Access Control Entries to the universal groups used for managing and operating Lync Server. Get-CsAdDomain is designed to tell you if all these preparations are in place. To run the command against your local domain just do this:

 

Get-CsAdDomain

 

And to run the command against another domain in your forest just include the Domain parameter followed by the fully qualified domain name of that domain:

 

Get-CsAdDomain –Domain litwareinc.com

 

Get-CsAdDomain will return the value LC_DOMAINSETTINGS_STATE_READY if the domain is ready for Lync Server, and the value LC_DOMAINSETTINGS_STATE_NOT_READY if it's not ready.

 

OK, now what about Enable-CsAdDomain? Well, again, typically you won't need to ever run Enable-CsAdDomain; Setup will do that for you. However, suppose you run Get-CsAdDomain and you get back the value LC_DOMAINSETTINGS_STATE_NOT_READY. If you want to, you can try to prep the domain by running Enable-CsAdDomain:

 

Enable-CsAdDomain

 

Or, to prep a domain other than your local domain:

 

Enable-CsAdDomain –Domain litwareinc.com

 

Incidentally, Enable-CsAdDomain is harmless: if your domain is already fully-prepared and you run Enable-CsAdDomain anyway, well, nothing bad is going to happen. And, many months ago, we even did this: we intentionally went in and messed up some of Access Control Entries created by Lync Server's setup program, then ran Enable-CsAdDomain to see if it would repair the damage. And guess what? It did!

 

Note. And here you thought nothing exciting ever happened at the Lync Server PowerShell blog!

 

Now, do we recommend that you go mucking around with Active Directory and then see if Enable-CsAdDomain can fix the problem? Uh, no, not exactly. In addition, we also don't recommend that you run the Disable-CsAdDomain cmdlet. Disable-CsAdDomain is designed to roll back all the changes that Enable-CsAdDomain makes to Active Directory. Does it really do that? Well, we can't say that with 100% certainty. However, we can say this: the one time we ran Disable-CsAdDomain it did something to Active Directory, and we had to reinstall Lync Server.

 

Before you begin to panic, don't worry: there are a few safeguards built into Disable-CsAdDomain that help protect you from inadvertently wiping out Lync Server. By default, Disable-CsAdDomain will fail if the cmdlet detects a Front End, Conferencing, or Web services server still running in the domain you're trying to disable. You won't get any particularly meaningful error message, but the command will fail.

 

We should also note that running Disable-CsAdDomain is not the way to uninstall Lync Server (if, heaven forbid, you ever need to uninstall Lync Server). It's possible to force Disable-CsAdDomain to run even if the cmdlet does detect a Front End, Conferencing, or Web services server still running in the domain. However, that's just going to "unprep" your domain; it's not going to uninstall Lync Server. But don't worry: some of our colleagues are currently working on the definitive guide to uninstalling Lync Server, a guide that will likely hit the shelves sometime in the next few weeks.

 

That's all we have time for today; we need to get back to work on our reality show. If you're interested in starring in that show (The Kissing Lync? The Hissing Lync?) just let us know. Admittedly, right now our show is about nothing at all. Fortunately for us, however, having a purpose or a reason doesn't seem to be a requirement for reality TV.