Posts Tagged ‘modules’


Which Version Does Import-Module Import?

Wednesday, July 13th, 2016 by June Blender
Applies to: Windows PowerShell 5.0.10586, 5.1.14385.0, PowerShellGet The Import-Module cmdlet, the #Requires directive, and module auto-loading (PS 3.0+) all import modules into a PowerShell session. But, which modules do they import by default? It's an important question when you are writing shared code that uses commands from other modules. And, the answer has become more complex with the advent of side-by-side versioning in PowerShell 5.0. Read the full post in the SAPIEN Information Center.   June Blender is a technology evangelist at SAPIEN Technologies, Inc. and a Windows PowerShell MVP. You can reach her at or follow her…   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 »

Update-Module 5.0 adds, not updates

Wednesday, February 17th, 2016 by June Blender
Applies to: -- Windows PowerShell 5.0.10586.63 -- PowerShellGet I'm a huge fan of sharing Windows PowerShell modules and making them easy to find (Find-Module), view (Save-Module), and install (Install-Module). So, I truly love the new PowerShellGet module. However, you really need to understand how it works before you use it. Otherwise, you might end up with commands and modules that don't work correctly (or at all) or don't do what you expect. Or, you might download modules with commands that shadow or hide commands that your scripts run. Update-Module is one of the really useful cmdlets in PowerShellGet, but if you don't know…   More »

Using Prefixes to Prevent Command Name Collision

Monday, February 15th, 2016 by June Blender
In January, I had the honor of presenting to the Mississippi PowerShell User Group (MSPSUG). I've known the organizers, Mike Robbins and Rohn Edwards for years, and truly respect them. The PSUG is online-only, which makes it a challenge for presenters, but they attract a very sophisticated audience, so my talks there are really conversations. This was a perfect venue for my "Avoiding Version Chaos" talk. (More at PowerShell Saturday in Tampa on March 19, 2016.) In one part of the talk, I demonstrated how to use noun prefixes to distinguish among commands with the same names. The demo flopped…   More »

Debugging Modules in PowerShell Studio 2012

Monday, October 22nd, 2012 by David Corrales
PowerShell Studio now makes it easier to debug and run your module projects. You now have the ability to execute and debug a module project directly from the IDE (Supported in PowerShell Studio 2012 v3.1.9 and up). Debugging a module project: When debugging (F4) or running (Ctrl + F4) a module project for the first time you will be asked to select a Startup Script:   This Startup Script will be used by PowerShell Studio as an entry point to run or debug the module project. Therefore, it’s important that you explicitly import the module in the script: The Startup…   More »

LOST! The forgotten features

Tuesday, October 2nd, 2012 by Alex Riedel
A week ago I was hanging out with PowerShell trainer extraordinaire Jason Helmick and while we where geeking out over PowerShell tricks and software features (yes, I know, bad, isn’t it?) I asked him how he would improve file groups. (…) (crickets) (…) File groups? So I demonstrated. I learned some time ago that most admins don’t like to use projects. Which isn’t really a surprise as most scripts used to be a single file affair. So anything that deals with projects was considered a “developer” feature.But there was the occasional script that used multiple files or some txt, inf…   More »

PowerShell modules and PrimalScript’s Object Browser

Saturday, December 12th, 2009 by Alex Riedel
The next service build of PrimalScript 2009 (5.0.622) will show registered modules in the object browser under the PowerShell node. Modules have not to be loaded by default to show in the browser, just like snapins they load on demand when you expand a node. This allows you to browse the registered modules on your system and their corresponding help information while writing scripts or working in the embedded console. As with all other items in the object browser, you can simply drag and drop the names to your code or the console to avoid typos and save keystrokes. PowerShell…   More »