I've been getting into power shell recently. I am beyond impressed with it, and I think its perhaps the most exciting SharePoint tool yet. It is extremely versatile and it really does live up to its name. I was amazed to see it supports c# and CAML too.
Obviously it goes without saying that a lot of love, energy and time went into developing the new power shell. I'm sure anyone who works with SharePoint considerably knows the value of this tool.
I was surprised to learn that our old friend, Stsadm is now considered redundant. For many years I've been using Stsadm, and although it is a simple tool it does one thing very well. It knows how to wait.
When you tell Stsadm to execute a command, it knows instinctively that it should wait for the command to complete before returning control. In other words it executes synchronously.
Powershell, in all its glory, does not wait for commands to complete, as a result you need to take an estimation and add sleep commands where applicable.
Now I am sure the developers did not code it that way in error, but a part of me thinks this could be a bit of a blunder, so my question is why would they code power shell so that it executes commands async only?