Archive for the ‘Windows PowerShell’ Category


SAPIEN Script Packager updates and new features.

Monday, October 24th, 2016 by Alex Riedel
The Script Packager in PrimalScript 2016 gets an update with the next service build (7.2.95). Since this service build changes the locations where your executable files are generated and some new options are available, we thought we'd let you know about these changes before they are actually released. Based on your feedback, the script engine selection in the Packager settings was too confusing. So we updated the user interface to minimize the number of selections and provide you with a preview of what this selection will do. Furthermore, as many of you indicated that you still need to support 32…   More »

Setting up PowerShell on your Mac (Update!)

Friday, August 19th, 2016 by Ferdinand Rios
Now that PowerShell is available on the Mac, we thought it would be useful to show how easy it is to setup a Mac terminal session that automatically opens into PowerShell. Figure 1 shows what we mean. [caption id="attachment_12634" align="aligncenter" width="1130"] Figure 1 - PowerShell Terminal Session[/caption] First you need to download the PowerShell macOS package from here (look for the Get PowerShell section in the and install it using the directions found here . Once PowerShell is installed and running on your system, follow the instructions below to set up your PowerShell terminal Here are the steps to follow: Open Terminal on…   More »

Write a Multi-Form PowerShell GUI App

Tuesday, July 26th, 2016 by June Blender
Tested on: PowerShell 2.0+, PowerShell Studio 2016 This step-by-step example shows you how to create a very simple multi-form PowerShell GUI app. The app consists of a parent form that gets data from a child form and displays it. When you finish, you'll know how to use the basic multi-form features of PowerShell Studio. For details about how these features work under the covers, see How Do Multi-Form Projects Work? For this task, we assume that you know how to create a single-form PowerShell GUI app or that you've participated in a Thinking in Events hands-on lab. Otherwise, start with…   More »

Introducing the SAPIEN Information Center

Tuesday, July 12th, 2016 by June Alane Reif
Over the years, the articles in this blog have grown extensively. There's a lot of valuable information in here, but it's become hard to find because it's mixed in with various tour announcements, special offers, conference recaps, and the like. So, we have decided to pull the important articles and place them—along with information relevant to PowerShell and scripting—in a more organized and easily searchable venue. We are proud to introduce the SAPIEN Information Center. The most recent articles are always highlighted in a list on the left side of the window. The SAPIEN Information Center currently has the following…   More »

PrimalScript 2016 service build adds CPU and memory performance graphs

Thursday, July 7th, 2016 by Alex Riedel
The latest service build of PrimalScript 2016 (7.2.91) adds performance graphs for your scripts. To enable this feature you just need to make the “Performance” tab visible before you execute your script. Performance data can be collected on any script run from within PrimalScript as long as you enabled output redirection. That means this applies to PowerShell, VBScript, Perl or any other script that you run from within PrimalScript. The output window will also display the peak values during the execution of your script when it finishes. Since collecting this data while executing your script obviously adds additional CPU and…   More »

PowerShell Studio 2016 – Service Release & High DPI Support

Tuesday, July 5th, 2016 by David Corrales
We released a new service build of PowerShell Studio 2016 (v5.2.124)!   Here’s what’s new: High DPI Support We have added high DPI support to PowerShell Studio’s UI. Those of you who previously ran PowerShell Studio on a high DPI monitor (Windows 10 in particular) probably noticed that the application appeared fuzzy. The fuzzy appearance is caused by Windows’ scaling of non-DPI aware applications. The good news is that this no longer the case with PowerShell Studio 2016. Not DPI Aware DPI Aware High DPI Layouts With high DPI screens, you will require high DPI layouts. When PowerShell Studio detects…   More »

Using a ModuleSpecification Object

Monday, June 27th, 2016 by June Blender
With the advent of side-by-side module versions in Windows PowerShell 5.0, the lovely, but obscure ModuleSpecification object has become your new best friend. Use it to make sure that the commands and module that you use are the ones that you intend. Using ModuleSpecification Let's start with an example. I want to get the Expand-Archive command in the Microsoft.PowerShell.Archive cmdlet. I can use Get-Command, of course, but when I surround the command name with wildcard characters to make sure it searches, it returns this: PS C:\ > Get-Command *Expand-Archive* CommandType Name Version Source ----------- ---- ------- ------ Function Expand-Archive…   More »

Which PowerShell Versions are Users Running?

Monday, June 20th, 2016 by June Blender
In March 2016, SAPIEN Technologies, Inc. posted a survey asking users and administrators which versions of Windows PowerShell they're running. We got 148 responses by the April 8 when we closed the survey. This blog post reports the findings. While reading them, please keep in mind that this is not a statistically valid survey. We didn't select users or control for anything. Still, I did not expect these results. I might be a bit naïve about enterprise computing, but I'm surprised by the widespread adoption of Windows PowerShell 4.0 and 5.0. My sense is that the community moved much more…   More »

How to Pass Parameters to a Pester Test Script

Friday, June 17th, 2016 by June Blender
Applies to Pester 3.4.0 Like any Windows PowerShell script, a script that contains Pester tests can include parameters. It's easy enough to run the script and pass parameters and values in the usual way. But, when you use Invoke-Pester to run the script, you need to pass the parameters in a hash table. This blog explains how to do it. This post is the third in a series about how to run Pester tests. See also, How to Run Pester Tests and Invoke-Pester: Run Selected Tests. See the posts in this Pester series: How to Run a Pester Test Invoke-Pester:…   More »

Invoke-Pester: Running Selected Tests

Wednesday, June 15th, 2016 by June Blender
Applies to: Pester 3.4.0 In How to Run Pester Tests, I talked about the different places that you can put your Pester days and the different ways to run them, including, but not limited to, the Invoke-Pester function. Today, I'll talk about the parameters of Invoke-Pester function that let you determine which tests run. Next, I'll show you how to pass parameters to a Pester test file. By default, Invoke-Pester runs all *.Tests.ps1 files in the local directory and its subdirectories. That's a useful default, but the parameters of Invoke-Pester let you control the alternatives. See the posts in this…   More »