PowerShell AST, your friend when it comes to PowerShell code analysis & extraction