Archive for the ‘PowerShell 5.0’ Category


Where are v3 and v4? PowerShell Versions in PowerShell Studio

Monday, December 21st, 2015 by June Blender
In this post, we explain why PowerShell Studio can run your scripts only the versions of Windows PowerShell that are installed on local and remote computers. If you've recently upgraded to Windows 10 from Windows 7, 8, or 8.1, you'll notice quickly that you now have Windows PowerShell 5.0. Depending on your upgrade path and subsequent updates, you might be running any version of Windows PowerShell greater than or equal to 5.0.10240. Or, you might have installed the shiny new Windows Management Framework 5.0 for Windows 7 SP1, Windows Server 2008 R2, and later versions of Windows client and server. In…   More »

Creating Objects in Windows PowerShell

Monday, October 26th, 2015 by June Blender
Applies to: PowerShell 5.0.10240 I was recently in the beautiful city of Copenhagen, Denmark, where I was the guest of PSUG.DK, PowerShell User Group in Denmark. We met in the swanky Microsoft offices for a hands-on about classes in Windows PowerShell 5.0. Microsoft Offices, Copenhagen, Denmark. In the hands-on lab, we create a class, create instances of the class, and add constructors, properties and methods. Then, we try some of the more advanced features, like static properties and methods, inheritance, and interfaces. To keep the class in a reasonably brief, when we create objects, I show New-Object and the New…   More »

Why Do We Need Constructors?

Wednesday, October 21st, 2015 by June Blender
While traveling after PowerShell Summit Europe in Stockholm, I was honored to be the guest of the Microsoft Technical User Group in Oslo, Norway (@MTUG_Norge). This well-established user group meets on the beautiful campus of the University of Oslo, a short light-rail ride from downtown Oslo. We got together for a hands-on lab on classes in PowerShell 5.0. It was an experienced group -- mainly IT operations folks -- who are well-versed in PowerShell. The concepts are all new, but the group of 35-40 people were quick to understand them. One thoughtful guy asked a particularly good question: Why do…   More »

MVP All Stars in Helsinki

Monday, September 14th, 2015 by June Blender
What's the future of Active Directory? What support can we expect for containers in Windows Server and client? Is PowerShell 5.0 complete? While most PowerShell scripters are focused on the upcoming PowerShell Summit Europe in Stockholm and PowerShell Asia Conference in Singapore, some of the finest minds were gathering in Helsinki for the MVP All-Stars PowerShell Mini-Summit in Helsinki on 11 September. Windows IT Pro MVP Sami Laiho organized another in a series of small, intense conferences in the beautiful capital of Finland. I was delighted to be squeezed in at the last minute on my way to Stockholm. These…   More »

iPowerShell Pro v5 Released

Tuesday, June 16th, 2015 by Ferdinand Rios
SAPIEN has just released a new version of its mobile PowerShell connectivity app, iPowerShell Pro v5. Included in this new version are: A redesigned user interface layout with new dynamic transitions and adaptive layout. A powerful syntax colored editor for creating and editing Powershell scripts. iOS 8 compatibility. PowerShell 5 cmdlets and about help. Connectivity to additional cloud services. Updated Twitter, blog and YouTube displays. Simplified adding user developed cmdlet help and about help. Bug fixes and performance enhancements iPowerShell Pro V5 is available on the iPhone App Store as a free update to current users or for $4.99 for…   More »

Hidden … sort of: The Hidden Keyword in PowerShell Classes

Wednesday, March 18th, 2015 by June Blender
The Hidden keyword hides properties and methods (and other members, like events) in a PowerShell class. When a member is hidden, you can still view and change it, but the Get-Member cmdlet doesn't display it without the Force parameter and the hidden members are not available to auto-completion features, such as PrimalSense and IntelliSense. You can apply the Hidden keyword to any member (property, method, event, etc), including static members. It is not case sensitive and it can appear anywhere in the member signature before the member name. As a best practice, I suggest placing it first to simplify troubleshooting.…   More »

Enumerated Types in Windows PowerShell 5.0

Monday, January 5th, 2015 by June Blender
Follow @juneb_get_help [Update: The original post referred to "enums" as "enumerators" when, in fact, they are "enumerated types." By contrast, enumerators allow you to process items one at a time. Many thanks to Windows PowerShell MVP Dave Wyatt (@msh_Dave) for the correction.] Enums have always been a part of Windows PowerShell, because they're an important part of the .NET Framework. But they're about to become even more popular, because changes in Windows PowerShell 5.0 make them very easy to create. ----------- Enumerated types ("enums") define a set of values, knows as "members" of the enum. You use enums to create a set…   More »

Find variables with class

Wednesday, December 24th, 2014 by June Blender
Follow @juneb_get_help I've been playing with the Windows PowerShell 5.0 preview and especially with its new class feature. After I create my class, I often create several instances of the class and experiment with them in my session. For example, I created a Wine class and then created several instances of my wine class. I saved each Wine instance in a variable. $PSWine = [Wine]::new("PSCabernet") $Shiraz = [Wine]::new() ... After playing with the instances for a while (and enjoying a few sips of PSWine), I couldn't remember all of the Wine objects that I'd created in my session. They were…   More »

Beyond custom objects: Create a .NET class

Tuesday, December 2nd, 2014 by June Blender
In yesterday's blog post, I used the Select-String cmdlet to capture the table of keywords and references from the about_language_keywords help topic and then used the new ConvertFrom-String cmdlet in the Windows PowerShell 5.0 preview to convert each row of the table into a custom object (PSCustomObject). The custom object worked quite well. I could search, sort, format, and use the objects in Windows PowerShell. PS C:\> $k = $table | ConvertFrom-String -TemplateContent $template | Select-Object -Property Keyword, Reference PS C:\> $k | where Keyword -eq "Trap" Keyword Reference ------- --------- Trap about_Trap, about_Break, about_Try_Catch_Finally But, it's just a simple step from the generic…   More »