Calling a method without parentheses

April 22nd, 2016 by June Blender
Late breaking news from PowerShell Conference Europe 2016!! During PowerShell MVP Chrissy LeMaire's (@cl) knockout session at PowerShell Conference Europe 2016, "My Journey to 200,000 Rows a Second" (don't miss the recording; I'll tweet as soon as it's available), PowerShell Principal Developer Bruce Payette (@BrucePayette) said that you can call the Where method without parentheses. [caption id="attachment_11844" align="alignnone" width="300"] Chrissy LeMaire and Bruce Payette at PowerShell Conference Europe[/caption] "It's a syntactic twiddle," he explained, as only Bruce can. In an exclusive interview, Bruce clarified that, beginning in PowerShell 4.0, you can call ANY method in PowerShell without parentheses if it…   More »

Setting Conditional Breakpoints

April 20th, 2016 by June Blender
Applies to PowerShell Studio 2016, PrimalScript 2016, and later. I write lots of scripts — for production, for research, for testing, and for demonstrations. And, inevitably, I hit a bug. I'm actually relieved when I do, because no code is perfect and I'd rather find the bugs before my users do. In fact, I make sure the content in my test database is full of oddities so it's as close to the real world as possible. When you are debugging with a large test sample, like a database or directory, the default line breakpoints are not sufficient. I can hit…   More »

Distributing files with your packaged scripts

March 22nd, 2016 by Alex Riedel
We get this question every week: Why can I not include my data files, secondary scripts, modules, other executables etc. with the packaged executable and have it unpack them when I run it? If you have been a SAPIEN customer for a few years you may remember that we had this feature in the packager until the 2012 version. The predominant operating system at the time was Windows XP and this worked fine. With the advent of Windows Vista and Windows 7 we received this question more and more: “Why does my packaged script no longer work?. You need…   More »

Engine Type Prerequisites

November 16th, 2015 by Devin Leaman
When building executables in PrimalScript or PowerShell Studio there are various engine types to choose from, each of them with a prerequisite that must be installed on the machine that will be running your program. For example, if you build an executable in PowerShell Studio and select the SAPIEN PowerShell V2 Host (Command Line) Win32 engine then the .NET Framework 2.0 is required on the target machine. Here is a table that shows the prerequisites for each engine type: Engine Prerequisite SAPIEN PowerShell V2 Host (Command Line) Win32 .NET Framework 2.0 SAPIEN PowerShell V2 Host (Command Line) x64 .NET Framework 2.0 SAPIEN PowerShell V2…   More »

How to submit a support request

November 9th, 2015 by Alex Riedel
With social media and every company having a presence in a number of places it sometimes feels like it won’t matter where you ask your questions. So it is only normal that we get phone calls, tweets, blog comments, smoke signals and bush drums sent our way for feedback and support requests. If you are just providing us with a comment or a one off remark that is all fine. Please put post-it notes to the right side of the door… However, if you are asking for help with a PowerShell topic or with one of our products we…   More »

PowerShell in the UK? You Bet! And SAPIEN is Supporting the Community!

September 25th, 2013 by Robert Morey
  SQLSaturdays worldwide are a great vehicle for database administrators and others to get together, learn from each other, and network.  Obviously, they center around SQL but we at SAPIEN are quite pleased to see PowerShell becoming part of these events.  Now that Microsoft has PowerShell at the center of its scripting world, this only makes sense.  You can see two presentations related to PowerShell on the SQLSaturday #228 schedule.  As with other user groups, we are doing our best to support SQLSaturday events by donating swag. Last year, we sent software, ebooks, training videos, t-shirts, and so on to…   More »

But it works on my machine…

May 16th, 2013 by Alex Riedel
We have all heard that phrase. We have all faced that scenario. A script runs perfectly fine on your machine or any VM you have, but just refuses to do anything useful on that one server where it really matters. Error messages can be notoriously unhelpful. “Access denied”, yes, but to WHAT and WHY? And everyone’s favorite “Unknown error” makes for a very frustrating day at the office. If you have physical or remote desktop access to that server it’s pretty easy, just use whatever debugger you have, install it on that machine and see what happens. Or, in case…   More »

How can I make PrimalScript execute <fill in script language here>?

April 18th, 2013 by Alex Riedel
One question keeps popping up in our support forums and inboxes: How can I make PrimalScript execute my AutoIt, HTML, PigLatin <fill in any other script language here> script? This is fairly simple as long as you know what the actual language engine is. We will use AutoIt and HTML as an example for this post. If you load one of the AutoIt examples and just press Ctrl+F5 to run the script you get an error message. Since AutoIt, unlike Windows Script Host or PowerShell, changes the executable name of the engine for each major version, you’ll have to go…   More »

PrimalScript or PowerShell Studio?

April 10th, 2013 by Alex Riedel
We do get this question from users new to our software quite frequently. We realize that there is some overlap between the two products, they are both editors after all and both support PowerShell. I could go on and explain at length what the differences are, but fortunately I don’t have to. Powershell guru and trainer extraordinaire Jason Helmick just released an excellent overview and video about what to choose for what and why. So, lean back, read the article and watch the video.  Click here for the blog article  Click here for the video…   More »

Jazz up your VBScripts with PowerShell and Windows Forms

March 12th, 2013 by Alex Riedel
Sure, you are supposed to write all new scripts in PowerShell. Some say you can replace any VBScript with a single line in PowerShell. But the truth is, many of you still have to maintain, develop and debug scripts written in VBScript. Some of our customers also have to maintain VBScript or JScript files that run under a custom host, automating some server application that likely will never be changed to use PowerShell. And, judging from some emails we get, you cast a jealous look at this new fangled Windows Forms stuff the PowerShell crowd uses to make great tools.…   More »