Have you been keeping an eye on the SAPIEN Information Center? If not, here are some articles you may have missed!
- Rebuild in PowerShell HelpWriter: Two ways to update help from code
by June Blender, January 31, 2017
The Rebuild feature creates a new XML help file for an existing help project. You use the Rebuild feature when the code in your module changes or a new version of the module becomes available. Rebuild examines the code in your module, gathers the cmdlet attributes, parameters, and parameter attributes from the code and creates a new help file. When you’re done rebuilding, the XML help file accurately reflects the current state of the module code.
- Why I don’t Use ValidatePattern
by June Blender, January 25, 2017
Validating input to PowerShell commands is critical. When I teach folks how to create PowerShell GUIs, we always discuss validating input that the user enters in a textbox. Something about that big empty box and its varied audience reminds PowerShell scripters that they should validate input.
- How to Add Icons to a ListView
by June Blender, January 19, 2017
I’ve been working on a PowerShellGet GUI application, much like the one our CEO wrote for PowerShell Conference Asia 2015. I wanted to use icons as visual indicators, but I had to figure out how to add them, and how to use them in PowerShell Studio. Here’s how I did it.
- ImplementingAssembly: Find PowerShell Classes in Modules
by June Blender, January 5, 2017
Beginning in PowerShell 5.0, you can create your own .NET classes and include them in scripts and modules. I’ve been having fun working on and teaching A Class of Wine. If you’re a PowerShell scripter, but not a developer, creating your own classes really helps you to understand the concepts in .NET classes.
- The MessageBox Control
by June Blender, December 16, 2016
MessageBox Control [System.Windows.Forms.MessageBox]
Displays a modal window with a message for the user and at least one button. The MessageBox closes only when the user clicks a MessageBox button. A MessageBox can contain text, buttons, and symbols that show information to the user and require their response.
- How to Find an Installation Directory
by June Blender, December 9, 2016
One of the important best-practice rules in scripting (and programming) is to avoid using constant values for things that can vary. Using constants or “hard-coding” variable values is prone to error and requires continual maintenance. So, wherever you can, use variables and wildcards for variable values and use constants for the few things in life that don’t change, e.g. New-Variable pi -Value [Math]::Pi -Option Constant
- Collapse This! Using Regions to Organize Your Scripts
by June Blender, December 7, 2016
Whether you’re writing a script or reading one, you want to keep your environment as simple and uncluttered as possible. You want to display only what you need to see and eliminate everything else. The Expand and Collapse features in PowerShell Studio let you do just that — with simple hotkeys and configurable settings. In this blog, I show how to configure and use the Expand and Collapse features of PowerShell Studio and how to use regions to organize the code in your scripts.
- Installing PowerShell 6 — For Everyone!
by June Blender, November 16, 2016
I’ve been having a great time exploring the new open-source, cross-platform version of PowerShell core on my Windows PC and on my Mac (yes, I have a MacBook Air!). When I mention this to folks, they give me that crinkled look. Either they’re very busy, and I understand, or they assume that open-source PowerShell is for developers.