It has been a while since I last blogged and also there are several PowerShell projects I kept on hold. One of that is an ISE addon to import module-sets from an addon menu option. By saying module sets, I mean a group of dependent PowerShell modules required to achieve a specific task. You can achieve that by simply loading all those modules manually. But that is not how “PowerShellers” do their work. We — PowerShellers — automate such things and that is the idea behind module sets. For example, this is what I have in my PowerShell profile. #region ModuleSet #SharePoint ISE (SPISE) ModuleSet if (!(Test-Path Funtion:Add-IseMenu)) { Import-Module -global ISECreamBasic } Add-IseMenu -Name "Module Sets" @{ SharePoint = { Add-PSSnapin -Name Microsoft.SharePoint.PowerShell Import-Module -Global WPK Import-Module -Global SPISE } } #end region So, in the above code snippet, all I am doing is adding an ISE addon menu option and loading a set of modules/snapins when I select that option. Simple.! This would show up in my ISE environment as this Now, when …
↧