Posts Tagged ‘V3’


Which versions of PowerShell do you run?

Tuesday, March 8th, 2016 by June Blender
The PowerShell team released Windows PowerShell 5.0 on Windows 10 last year and just re-released Windows Management Framework (WMF) 5.0 for earlier versions of Windows. But, we know from years of experience that many people don't upgrade their versions quickly. It takes time to get to know and trust a new version. In a large enterprise, it takes time to do the parallel testing to certify that a new product is secure and compatible with the software that the organization uses. Take the survey: Which version of Windows PowerShell do you use? For those of us who are writing scripts and modules to share, this…   More »

PowerShell Scoping – Revisited

Wednesday, April 10th, 2013 by David Corrales
Yes, we said we would not speak of it again, but a user post provided a good example of the change in scoping rules between PowerShell V2 and V3. This particular user had a question about GUI controls on our new PowerShell GUIs forum and provided an example GUI script. In the example, the user declared a function inside an event script block: $OnLoadFormEvent={ #TODO: Initialize Form Controls here $t = dir c:\PowerShell\ $t2 = dir c:\Scoping\ function outTextBox1($textOut) { $richtextbox1.Text = $richtextbox1.Text + $textOut } } This script block is called when the GUI Window is about to display.…   More »

Another PowerShell V3 breakpoint bug [UPDATED]

Wednesday, March 27th, 2013 by Alex Riedel
[UPDATE] Some users report that they cannot reproduce this behavior on Windows 8. Our Windows 8 machines show the same behavior. We will investigate further what the differences are. [END UPDATE] As we previously reported here (PowerShell V3 breakpoint bug) PowerShell V3 has a serious breakpoint bug where breakpoints cannot be set or removed after a script has been started. Our team has now discovered yet another breakpoint related bug in V3, which basically renders Disable-PSBreakpoint inoperative. It just doesn’t work. Let me illustrate with the Microsoft Powershell V3 ISE under Windows 7 SP1. We open a simple four line…   More »

Not all syntax coloring is created equal

Wednesday, February 13th, 2013 by Alex Riedel
Syntax coloring for programming languages was originally introduced as a visual aid to assist developers in assessing the syntactical correctness of code. Unlike the squiggly red or green underlines in Microsoft Word colors indicate validation rather than error. So while glancing at a syntax colored stretch of code the usual green hue of comments and reddish string colors enclosed in double quotes quickly instill a sense of the structure to the code. Commands are colored in certain specific colors and indicate that the system is aware of them. Traditional programming languages, like C/C++, have only a very few keywords, so…   More »

Out-GridView fails in PowerShell V2 after V3 update

Friday, December 21st, 2012 by David Corrales
Seems there was a recent update to PowerShell V3 that has affected PowerShell V2. Now the Out-Gridview  cmdlet produces an error and no longer functions in PowerShell V2. This issue affects all products using PowerShell including packaged scripts running in V2 mode. V2 only machines may not be affected To reproduce the error start PowerShell in v2 mode: powershell.exe –version 2.0   Next run the Out-GridView and you will get the following error:   We reported the issue to Microsoft using Connect:   [UPDATE] It seems this is by design, which in turn doesn’t make v3 fully backwards compatible.…   More »

PowerShell V3 support

Monday, October 22nd, 2012 by Alex Riedel
Just in case you missed it. With the latest service builds of PrimalScript 2012 and PowerShell Studio 2012 we added support for PowerShell V3. PrimalScript 2012 version switch   PowerShell Studio 2012 version switch   As you can see it’s pretty easy to switch which version you want to develop for, just press a button. Note that you must have V3 installed locally or a remote machine with an imported V3 cache for the corresponding button to be active. Also, on a Server 2012 or Windows 8 machine with the PowerShell V2 engine disabled, the V2 button may be grayed…   More »

Developing PowerShell scripts for other machines (Part 2)

Tuesday, October 16th, 2012 by Alex Riedel
Yesterday we showed you how to export the cache information on a remote machine. Today we go through the steps to actually use that information. Remember that we exported the cache file on that Windows 2008R2 machine as “WIN2008R2TESTVM.CacheExport”. Let’s assume we put that file on the desktop of your local machine. Now fire up PrimalScript 2012 and select “Import Remote Cache” from the Platform group on the Home tab: Select the cache export file on your desktop. Select the appropriate choices for your remote connections. Depending on your selection some of the following options may not be available to…   More »

PowerShell V2 Bug Introduced After Installing V3

Tuesday, September 25th, 2012 by David Corrales
As some of you may know, we are working on updating our products to support PowerShell V3 and have been running various tests to ensure our software functions correctly. During this testing process we stumbled upon a minor bug that was introduced into V2 after installing PowerShell V3 on Windows 7. As it turned out, this bug is also present on Windows 8 machines. Our goal is to inform you about this issue, should ever encounter it while using our PowerShell products. The following is a syntax error produced by a script using the V3 console. As you can see,…   More »

PowerShell V3 breakpoint bug

Monday, September 24th, 2012 by Alex Riedel
While we are adapting and verifying all our bits and pieces for PowerShell V3 and Windows 8, we sometimes stumble across little changes from PowerShell V2 behavior. Most of the time this is pretty simple and we can adapt our code to a new object or a change of where the information is located. Sometimes however we come across a real bug. This is one of these instances. The following has been tested in Windows 8 RTM with the PowerShell V3 ISE (64 Bit). Take the following simple script: We will put a breakpoint on line 2 and hit run:…   More »