Posts
49
Comments
83
Trackbacks
0
February 2006 Entries
Disclosure
I work for Microsoft (specifically the Exchange team). Nothing I say on this site should be taken as an official statement from Microsoft, so please don't involve me any "hot" news story as an official MS representative. Or in other words: my postings are provided "AS IS" with no warranties, and confer no rights. I love computer science and clearly that is why I work in the tech industry and also why I happen to work at MS. That does not mean that I hold anything against OSS, Linux, Unix, IBM, google or penguins. I recognize that all computers today are essentially alike, see my honors thesis to get an idea of some radically different paltforms (you should immediately see why I don't see distictions between the different platforms out there today). If you'd like to know more, please feel free to send me feedback or see the about page.And btw: I use Emacs, Xemacs, VI and Notepad. Mostly notepad though (its so dang simple).
posted @ Monday, February 20, 2006 12:02 AM | Feedback (0)
About
This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.
posted @ Sunday, February 19, 2006 10:02 PM | Feedback (0)
Its a one line world
We already know that Monad is as powerful (or more) than some programming languages. But is it required to do complex scripting in Monad to do simple things? Do you have to learn all the knob and switches in order to use it to manage Exchange? When we started designing the Exchange cmdline and scripting interface, we made absolutely sure that 80% of our customers, who normally have little or no scripting experience, can still use Monad/Exchange cmdline to auotmate or perform their tasks. Eileen has a similar question on her weblog as well. Let me give some examples (these are all public already so you'll have to wait for new stuff later on, sorry!):

   get-mailbox -server LAServer |             move-mailbox -targetdatabase OaklandSG\OaklandMDB What is this line doing? It looks cryptic as the syntax is new and there's the new operator "|" in the middle of the sentence. The "|" character should already be familar to the unix folks, and is possibly the first (and only?) concept that you have to learn to get some good mileage out of the Exchange cmdline. What it means is: take the results of the operation on the left hand side and pass those results to the operation on the right hand side. Like this:

   a | b | c

First "a" runs, and the results are passed to "b", which then consumes those results and then passes them to "c". Think of it as a pipeline of workers in a car plant. The first worker creates a car specification:

   make-carspecification -output "new Car Spec"

Then the second worker takes the specification and creates a working model out of it:

   make-carmodel -fromspecification "new Car Spec" -output "new Car Model"

Then the third worker takes the model and produces the actual car:

   make-car -frommodel "new Car Model" -output "new Car"

Expressed as a pipeline (remember: in a pipeline results from the first operation are passed to the second and so on), this simply becomes:

   make-carspecification | make-carmodel | make-car -output "new Car"

As you can see, the pipeline operator takes care of the hard work of specifying the inputs and outputs everytime (you could do that if you wanted to manually). In the last operation (make-car -output "new Car"), we don't have any body to take the new car and do something with it, so we simply output it directly. In the future if we add a sales force to our Car pipeline, we could do:

   make-carspecification | make-carmodel |              make-car | sell-car -tocustomer "Roy's Honda Dealership" So the pipeline concept is really powerful as it allows you to bind together many interesting operations together to do something meaningful. Let's go back to the Exchange example:

   get-mailbox -server LAServer

This statement says: "return all the mailboxes that are on server LAServer". So the full statement (remember: the output of the first command is consumed by the second command to do something interesting):

   get-mailbox -server LAServer |              move-mailbox -targetdatabase OaklandSG\OaklandMDB says: "return all the mailboxes that are on server SvcServer and move them to the database OaklandSG\OaklandMDB". In a real world situation, this one line will move all the users that are in a server in LA to a mailbox database in Oakland. Imagine your company changed offices and during the office move weekend, the Exchange administrator needs to move all the mailboxes from a server in LA to a server in Oakland... well they could do it one by one or do it in bulk using the cmdline. The point is that you don't have to write "scripts" to get some serious mileage out of the cmdline. Right about now, I usually get the question, so what if I messed up? What if I'm not sure what the cmdline is going to do? Well for that scenario we offer the following:

   get-mailbox -server LAServer |              move-mailbox -targetdatabase OaklandSG\OaklandMDB -whatif That will actually run the command without doing anything intrusive... basically its a way to "mock" what the command will do. In this particular case it will have output like this:

   Whatif: Moving mailbox for "John Doe" to database    "OaklandSG\OaklandMDB" And just in case you wanted to be absolutely sure you were doing the right thing, the system will automatically ask for confirmation for destructive operations. That means there is a safety cushion built in, out of the box, for cmdline users. So I hope that was a helpful introduction to the world of one-liners and why they really express the true power of Monad and Exchange cmdline / scripting experience. You can write lots of complicated scripts, but the majority of time, you simply have to construct a one or two line pipeline.

posted @ Saturday, February 18, 2006 6:02 PM | Feedback (0)
starting a tech only blog
In preperation for E12 I've moved all the technical content of my regular blog to this one. That way I can keep the content nice and seperated. Over the next few days I'll migrate some of the relevant technical posts to this site.
posted @ Friday, February 17, 2006 10:02 PM | Feedback (0)
News
A little slow these days as I'm busy working on exchangelabs.com. I will try and post tidbits when I get some time. Enjoy the older posts till then!