On our PowerShell community forums, we have recently received questions asking if it is possible to store PowerShell variables in external files, and if so, how is it done. It is indeed possible to store variables in external files for PowerShell to use. These external variables can be stored in a variety of file types. […]
Category: Howto
Changes to License Activation Reset Policy
To make your lives (ok, and ours!) easier, we have updated our License Activation Reset Policy. The new 2018 products (and the last few 2017 releases) will no longer require you to wait six months before resetting an activation via your account page. That’s right, if your machine crashes or you wipe it clean before […]
Introducing our new Feature Request web application
A while ago, Friedrich Weinmann, a frequent feature requester and current SAPIEN MVP, put in a request for a Public Wish List. Initially, we thought we didn’t really need that because we have a Wish List and Feature Requests forum. However, after some consideration, we realized Fred had some very valid points. In Fred’s words, […]
PowerShell Write Cmdlets
PowerShell has multiple Cmdlets that display information, but the question that often arises is which one should be used? In this post we will take a look at the differences between some of the more common ways to display information in PowerShell and which one will fit best for a given situation. Before we […]
Write a Windows Service in PowerShell
Previously I showed you the new Windows Application engine (https://www.sapien.com/blog/2017/06/14/new-script-engines-for-windows-powershell/) and the Windows System Tray engine https://www.sapien.com/blog/2017/07/10/creating-a-system-tray-application-with-powershell/. Today I will show you the last of the three new engines, the Windows Service engine. Writing a Windows Service can be a challenging experience, even for a programmer. Generally, unless you do that exact thing for a […]
Enabling deep script block logging
As of the KB3000850 update and PowerShell 5.0, PowerShell has included script block logging so that admins would have more tools for the blue team side of pen testing. If you’re unfamiliar or have never heard of it before, I recommend giving this blog post a read. Not only does the post describe what script […]
Friday Puzzle Solution: Why doesn’t Verbose work?
On Friday, February 17, 2017, I posted the following puzzle on Twitter and Facebook (and here!). It shows a PowerShell function with a Write-Verbose command and asks “Why won’t this verbose string print?” You might think of this as a beginner puzzle, but after years of using PowerShell, I still hit this issue occasionally, and […]
Friday Puzzle Solution: What does Return keyword return?
On Friday, February 3, we posted a Friday Puzzle that shows a PowerShell function and a PowerShell class method that contain the same command sequence, including a statement with the Return keyword. The puzzle asks: What does the function return? What does the class method return? And, of course, we want to understand why. To […]
SAPIEN Information Center – Articles you may have missed
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 […]
From regular user to elevated administrator…
This is a question that comes up fairly often in our support forums, so I thought I would post a quick overview. The scenario is that an admin wants to package his script as an executable to allow regular users to accomplish some type of task, which requires full administrative privileges. Since Windows Vista, […]