Whether it is automated unit testing or automated tasks, Windows Powershell is the right script for you. Even products like Episerver and Sitecore have Extensions for it. You can extend it yourself simply by loading assemblies.
You can also run Powershell Scripts from your custom applications. Are you struggling with Powershell, email me at email@example.com and I will see if I can assist.