As I said I am just starting to fool around with Powershell V2.0 and I ran across a cmd-let that really grabbed my attention and I went to read more about it. This is a Fanatastic Idea and I am so excited to see Powershell use this in more Providers.
Transactions, How cool is that? Just like when running a query in a database, this will run the commands as a transaction and have the ability to roll back the changes. If all of the changes that you would like to be made are not completed correctly it will rollback to the way it was before the script ran. Currently it looks as though only the registry PSProvider supports this but man I hope that changes. I can think of many scripts where this would be useful. One example is my SQL Server Monitoring tools, I have a function that goes out and changes the on-call contact. I think it would be nice for it to be all or nothing. That way you do not get two people on call if for some reason the function does not complete. I love it. Read more at http://www.microsoft.com/technet/scriptcenter/topics/winpsh/transactions.mspx