Archive for the ‘Howto’ Category


 

SAPIEN Information Center – Articles you may have missed

Monday, November 7th, 2016 by June Alane Reif
Have you been keeping an eye on the SAPIEN Information Center? If not, here are some articles you may have missed! Working with SemanticVersion in PowerShell by June Blender, November 3, 2016 As the versions of Windows PowerShell and PowerShell (not only Windows!) proliferate, it becomes more important to know on which version of PowerShell your shared scripts and modules are running. Beginning in the open-source versions of PowerShell 6.0-alpha, the version object in $PSVersionTable.PSVersion switched from a System.Version object to a System.Management.Automation.SemanticVersion object. Requiring a Version of PowerShell by June Blender, November 2, 2016 This article is taken from…   More »

Enable WMI Explorer Remote Connection Permissions

Wednesday, September 7th, 2016 by Devin Leaman
One of my first tasks, after I was hired at SAPIEN, was to figure out why users couldn’t view WMI classes on remote computers and turn the solution into an easy-to-follow blog post. After completing that, I had to turn it into a script so that it was even easier to set up. Although I managed to complete the script, there was the catch that it worked only on Windows 8. I couldn’t figure out why it wasn’t working on Windows 10. With the help of a couple of SAPIEN MVPs (thanks, Mike and James!), I’m happy to share that…   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 README.md) 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 »

HelpUri v. HelpInfoUri

Tuesday, August 16th, 2016 by June Blender
Although the names are similar and often confused, these properties are different. If you confuse them, the help for your PowerShell commands and modules won't work. The HelpUri property stores the URL (http or https) of online help for a command. It's a property of commands (cmdlets, functions, workflows). When a user runs Get-Help -Online, Get-Help opens the default browser to the HelpUri property value. The HelpInfoUri property of modules stores the URL of the online location of the HelpInfo XML file that enables updatable help for the module. In fact, a non-null value of HelpInfoUri indicates that the module…   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 »

How Git branches affect files on disk

Wednesday, May 25th, 2016 by June Blender
When I started using Git back in 2012, I wasn't new to source control systems. I used a database-backed source control system back in the 80's and, at Microsoft, I used Visual Source Safe (VSS) and Team Foundation Server (TFS). I was a whiz at checking files in and out, examining and comparing versions, and restoring versions. Still, when I started to use Git for the Azure "help drawer" docs, I was totally unprepared for the effect of changing branches on Git-managed files on disk. Git Checkout -- An Example Here's an example. I'm working in my fork (my online…   More »

Add custom tools to the menu

Monday, May 23rd, 2016 by June Blender
There are so many features in PowerShell Studio and PrimalScript that I think I can't live without, like the Format Script button, file groups, and conditional breakpoints. But, there are few features I'd love to have that aren't there. They're easy enough to add, but they're really personal to me. Fortunately, I can add them myself. What is a custom tool? The Custom Tool feature in PowerShell Studio and PrimalScript lets you define commands in an INF file and add them to a menu. For example, I have huge Scripts library on One Drive where I keep all of my…   More »

Property Pane: Change property values of multiple objects

Friday, May 20th, 2016 by June Blender
Sometimes, I say things so many times that I start to believe them, even when I'm wrong. Here's a correction of one of the details that I've gotten wrong repeatedly. "You can only use the Properties pane on one object at time." -- me Um, no. The Properties pane in PowerShell Studio displays the properties and property values of an object, that is, one of the Windows Forms controls on the Designer pane. By default, it displays the properties of one object at a time. To determine which object the Properties pane displays: In the Designer pane, click the object. -or-…   More »

GitHub: How to update your fork

Monday, May 16th, 2016 by June Blender
Like almost everyone in the DevOps world, I use GitHub, not because I like it, but because everyone uses it. In fact, I dislike it, because it’s confusing by design. Its misleading language excludes users, rather than welcoming them. To use it, you have to forget the actual meaning of words in English, or even their technical meaning, and use them as though they are arbitrary strings. Worst of all, because most people memorize a command sequence without fully understanding how it works, when something goes wrong, it’s almost impossible to troubleshoot. Okay, enough ranting. I just discovered a solution…   More »