I’m pretty excited about this new module. Originally I threw something very crappy together just to get a rough idea of which commands I was calling. But then I started polishing it up and polishing it up and I arrived at something I just had to post.
I will post back with some more information later, but the basic idea is that this uses the new PSParser class to parse a PowerShell script into tokens. It then analyzes the tokens to figure out some basic facts about the script:
Which global variables are being referenced
Which modules does the script import that are not currently imported
Which commands are being referenced by the script?
Which commands are functions defined in the current script?
Which command are aliases and which commands do they resolve to?
Which commands are built-in functions/cmdlets/aliases/etc?
Once all of the above has been determined, it’s presented in a format that is easy to read.
I added mine to the custom menu of PowerShell ISE.
Posts