Thanks! This script has been very helpful in getting us started in automating our server configurations for DR scenarios. The one object we have not been able to figure out is Extended Events. Any ideas on how to script those with Powershell? I have searched high and low and have not been able to figure out how to do it.