Posts Tagged ‘module’


 

How to Write About Help for your Module

Monday, May 2nd, 2016 by June Blender
Since installing PowerShell 5.0, I've been using the PowerShellGet cmdlets to install and examine many of the new modules on PowerShell Gallery. Unfortunately, this is often quite a chore. While many have some help for cmdlets, few have an About topic that tells me how to use the cmdlets together to solve real-world problems. And, in those that do, the About topic feels like the authors wrote whatever popped into their minds at the time. In this post, I'll share my ideas for best practices for writing the primary About_Help topic for your module. Best Practices for a Module About_Help…   More »

Exporting from Modules: A Reminder

Thursday, March 24th, 2016 by June Blender
There are so many new things in Windows PowerShell that I often assume that I know the basics. But, while working on a project about modules, I ran into some new guidance from PowerShell developer Jason Shirk and a great blog post that demonstrates that information about variables in a TechNet topic about module manifests is wrong. Here are some important reminders about modules and their manifests: By default, all functions and aliases are exported, but variables are not exported. "By default, all variables are exported" in How to Write a Module Manifest (MSDN) is wrong. This topic is outdated…   More »

PowerShell Studio 2014: Convert Functions into a Module

Wednesday, July 9th, 2014 by David Corrales
PowerShell Studio 2014 added a new project feature: New Module From Functions. You may find at times you reuse various functions and constantly copy them into new scripts or find different variations of the same function are located in different scripts. You may come to the conclusion that those functions would better serve you in the form of a module where all your scripts can reference the functions in a centralized location. This is where the New Module From Functions feature comes in handy. The New Module From Functions allows you to import functions from various ps1 scripts and merge…   More »

Introducing the MSI Wizard

Wednesday, June 5th, 2013 by Alex Riedel
Both PrimalScript 2014 and PowerShell Studio 2014 will have to ability to create Windows Installer files (MSI) for your scripts, modules or packaged executables. It works pretty straightforward; put the files you want to install into a folder, enter some additional settings and mucho presto you have an installer. As we previously pointed out, this may be a transition for some of you. So we decided to make a time limited preview copy available for everyone to test. Let’s go through the fields and options. 1. Product Details Product Name: That is what you will see in the Control Panel’s…   More »

Changes are coming to the script packager

Monday, June 3rd, 2013 by Alex Riedel
The Script Packager has been a key feature of PrimalScript for many years now. Devised originally in the Windows 2000 era, it has some features that simply are no longer relevant or applicable in modern Windows versions. As many of you know, the packager has the ability to self-extract data files and COM objects when invoked. In that regard, packages work very much like a self-extracting ZIP files. Obviously that method did impose some size limitations, but it has worked well for many years. Starting with Windows Vista and Windows Server 2008, this self-extracting nature of script packages became more…   More »

Debugging PowerShell modules with PrimalScript 2012

Friday, October 12th, 2012 by Alex Riedel
The latest service build of PrimalScript 2012 (6.5.132) makes debugging modules a bit easier. If you are developing a script module you most likely already have a script that exercises the various cmdlets in your module. Just load that script and your psm1 file into PrimalScript, set your breakpoints and hit F5 with your module file active. This dialog will show you all the open PowerShell scripts. Just select the one you use to drive or test your module and press OK. And there we are, hitting the breakpoint inside your module. It’s as simple as that. All other debugging…   More »