The PowerShell AST essentially breaks down the code into a hierarchical tree with each element representing a part of the tree, making the scripts self aware.
Puppet is one solution that is trying its best to make sure Windows engineers and admins have the tools necessary to manage effectively. Here's how to use it.