Here’s an interesting question that came up recently:
Yes, I can help. Actually I came across this very same scenario myself not too long ago when working with a new VM.
If you install PowerGUI today, you can let it pick which of the core PowerPacks to install. By default, PowerGUI will pick the PowerPacks for which you have the required PowerShell snapin(s) already installed. For example, this means that the Exchange 2007 PowerPack will be installed automatically if you have the Exchange Management Console installed on your local machine, and the Active Directory PowerPack will be installed automatically if you have the Quest AD Cmdlets installed on your local machine.
Alternatively, you can also pick which PowerPacks you want to install yourself whether you have the required snapin(s) or not by using the custom install option. I usually take this approach when I install PowerGUI, picking all PowerPacks so that I get all of the functionality that it comes with. Most of the time this works fine when I have already installed all of the snapins I need, but what happens if you are missing one or more of the required snapins? When you open PowerGUI for the first time your PowerGUI tree will automatically load all of the PowerPacks you installed for which you have the required snapins. If you installed PowerPacks for which you don’t have the required snapins, they won’t show up in the PowerGUI tree.
Sounds like an easy enough problem to solve, right? You can just install the missing snapin and then come back into PowerGUI and…um…notice that the PowerPack isn’t there. This is because the automatic loading of the PowerGUI tree is only done once (at the moment; this will likely change in the future). If you don’t have the required snapin installed when that happens, the PowerPack doesn’t get loaded into the PowerGUI tree. Here lies the problem for the individual who asked the question stated earlier.
Fortunately the solution is straightforward once you know where the missing PowerPack is stored. When PowerGUI is installed, all PowerPacks that are installed with it are placed in the PowerPacks subfolder of the PowerGUI installation folder. To load a PowerPack that is missing because the prerequisite snapin wasn’t installed earlier, all you need to do is select File | PowerPack Management, click Import, browse to that folder and select the PowerPack that you want to import. Once PowerGUI has verified that you have the required snapin(s) for that PowerPack installed it will import the PowerPack and your missing folder will be available in the PowerGUI tree. And in case you weren’t aware, this is also the same way you would extend PowerGUI with other PowerPacks that you download from the library…download the PowerPack file, right-click the root node, select Import, and then select the PowerPack file you downloaded.
Hopefully this will help as you start using more snapins to manage and automate more with PowerShell and PowerGUI.
Technorati Tags: PowerShell,PoSh,Poshoholic,PowerGUI,PowerPack
2 thoughts on “Why isn’t my PowerPack showing up in PowerGUI?”
other PowerPacks that you download from the library…download the PowerPack file, right-click the root node, select Import, and then select the PowerPack file you downloaded.
Thanks for pointing out the outdated method of loading PowerPacks. This was written before we had the PowerPack Management dialog. I just updated the article to use the current mechanism that allows you to load PowerPacks using the PowerPack Management dialog.