Powershell: Debug in Production / Good Exception Handling
问题 What is the best way to analyze powershell cmdlets in production ? Suppose you write a script which does the following - Write lof of registry values Register COM Dlls Make IIS AppPools Start Windows Services &...something goes wrong in between, then what are the best practices to inform user such that root issue can be traced and debugged ? Suppose, user credentials fail for AppPool creation for some reason and I want to stop processing at that time plus I want to rollback what I had done