I recommend finding time to watch Jeffrey Snover and Kenneth Hansen’s Desired State Configuration in Windows Server 2012 R2 PowerShell talk from TechEd 2013. Desired State Configuration is a way of specifying, via new PowerShell language features, how you want a server to get setup and configured. PowerShell then takes that configuration data, and applies it on the server or servers of your choice. It looks like a great piece of technology.
Remember, keep your configuration and your scripts separate.