The CommandAssist module allows you to easily create proxies functions for every command in a module (or snapin).
There is a handy command to generate these proxy modules included with the CommandAssist module.
Building an Assisted Module
The easiest way to explain what happens is to walk through the usage of New-AssistedModule. To that end, we'll create a proxy of a module that I've been use regularly - the ActiveDirectory module.
First we'll load the CommandAssist module:
Second we will load the module we want to create a proxy for:
**NOTE: **This only has to be done the first time to create the proxy.  Afterward, the proxy module will load the real module in the background. Third we will use New-AssistedModule to create our proxy module.
$NewModulePath = c:\users\smurawski\Documents\WindowsPowerShell\Modules\AssistedAD Get-Module ActiveDirectory | New-AssistedModule -ModulePath $NewModulePath
As noted in the screenshots, the module created has proxies for each command that add the -assist parameter. There also is a module file that will load all of the proxies, as well as the source module (in this example, AssistedAD.psm1).
The next post will review how the -Assist parameter works.
*NOTE: *The proxy module will load the real module in the background (so if you distribute it, the end user will need the source module or snapin as well).Want more great reading? Check out my reading list!