Quicktip: PowerShell command history on Windows 10 using PSReadline

In Windows 10 PowerShell 5.0 comes bundled with PSReadline. This module allows for a number of useful features and today we will focus on getting access to the command history. A very useful feature of PSReadline is that it writes the history of PowerShell commands to a text file and this text file is easily accessible. The path where this file is stored can be found by executing the following command:

1
(Get-PSReadlineOption).HistorySavePath

PSReadLine

To view the list of previously executed commands you can type the following:

1
Get-Content -Path (Get-PSReadlineOption).HistorySavePath

This will output the contents of the history file to your PowerShell console. Alternatively the file can be opened by your favorite editor by using the Invoke-Item cmdlet:

1
Invoke-Item -Path (Get-PSReadlineOption).HistorySavePath

A very useful feature if you accidentally closed your console without saving your command history.

TwitterLinkedInFacebookGoogle+RedditWordPressEmailTumblrPinterestHacker NewsShare

PowerShell 4.0 Update available for 2012/2008R2/Windows 7

New PowerShell 4.0 updates have been released, part of the Windows Management Framework 4.0 (WMF 4.0). With WMF 5.0 released and then later temporarily retracted from the download center there might be some confusion about who this patch is for, I hope to clear up some of that in this blog post.

So first and foremost, this is a PowerShell 4.0 Update package now also released for Windows Server 2012/2008 R2 SP1 and Windows 7SP1. This upgrade package contains some improvements in regards to DSC and PowerShell logging, please refer to the following two blog articles by the PowerShell team for full details:
Windows Management Framework (WMF) 4.0 Update now available…
Windows Management Framework (WMF) 4.0 Update is coming your way

So more importantly who is this patch intended for, from my perspective this patch is for the following situations:

  • You have WMF 4.0 installed and are in need of the features and fixes offered by this patch
  • Upgrading to PowerShell 5.0 (once it is re-released) is not an option because of incompatibilities which prevent you from upgrading
  • You are in an enterprise environment where roll-outs of completely new versions is limited but patching is possible
  • You are a curious individual and would like to play with the latest, supported, version of PowerShell on your version of Windows

WMF40Update

For more information about what is new in this update, please refer to the following article:
What’s New in Windows PowerShell

The WMF 4.0 updates are currently available as a separate downloads for the following Windows versions:

Operating System Service Pack Prerequisites UPDATE
Windows Server 2012 WMF 4.0 is installed and .NET Framework 4.5 KB3119938
Windows Server 2008 R2 SP1 WMF 4.0 is installed and .NET Framework 4.5 KB3109118
Windows 7 SP1 WMF 4.0 is installed and .NET Framework 4.5 KB3109118

For more information these WMF 4.0 Updates and the links in this article please refer to the links below:

Links in this Article
Windows Management Framework (WMF) 4.0 Update now available…
Windows Management Framework (WMF) 4.0 Update is coming your way
What’s New in Windows PowerShell

PowerShell 5.0 RTM available for download

Currently not available for download

For more information:
Windows Management Framework (WMF) 5.0 currently removed from Download Center


PowerShell 5.0, part of the Windows Management Framework 5.0 (WMF 5.0), is now released and available in the Microsoft Download Center.

WMF5Released

WMF 5.0 is currently available as a separate download for the following Windows versions:

Operating System Service Pack Prerequisites
Windows Server 2012 R2 .NET Framework 4.5 or above
Windows Server 2012 .NET Framework 4.5 or above
Windows Server 2008 R2 SP1 WMF 4.0 is installed and .NET Framework 4.5 or above
Windows 8.1
Windows 7 SP1 WMF 4.0 is installed and .NET Framework 4.5 or above

Currently WMF 5.0 RTM can be installed on older Windows clients, Windows 7 and Windows 8.1,  the updates can be downloaded. On Windows 10 WMF 5.0 is not available as an additional download as Windows Update can be used to update the Windows Management Framework.

Before installing WMF 5.0 on your system, please make sure that you read the released notes as there are currently known incompatibilities with the following products:

  • Microsoft Exchange Server 2013
  • Microsoft Exchange Server 2010 SP3
  • Microsoft SharePoint Server 2013
  • Microsoft SharePoint Server 2010
  • System Center 2012 Virtual Machine Manager

For more information please refer to the Windows Management Framework (WMF) 5.0 RTM Release Notes Overview on MSDN.

For more information on WMF 5.0 and the links in this article please refer to the links below:

Links in this Article
Windows Management Framework 5.0 Download
Windows Management Framework (WMF) 5.0 RTM Release Notes Overview
Known Incompatibilities
PowerShell Team – Windows Management Framework (WMF) 5.0 RTM is now available
Windows Management Framework (WMF) 5.0 currently removed from Download Center

PowerShell Conference EU – Sessions have been approved

Earlier this week I received an email with a joyful message from the organization of of the PowerShell Conference EU. All three of my sessions that I submitted for the conference have been accepted so I am happy to announce that I will be speaking at the PowerShell Conference EU.

BannerSpeaker

The full schedule and all the presentations has not been announced yet, but it promises to be the event that cannot be missed in 2016. The location looks amazing from the pictures and from what I have heard it appears to be a great location. The combination of the speakers, the location and our shared passion for technology will make this into the event that cannot be missed in 2016.

HCCbanner

On the official website, PSConf.eu the event is listed as follows:
“Welcome to the next great European PowerShell event!

Deutsche PowerShell Konferenz and enthusiastic PowerShell Community Members from all across Europe have united together under the #PSConfEU banner to create an extraordinary PowerShell Community Event in Europe this coming April.

For this conference we will be bringing together PowerShell experts from all around the globe to create a unique 3-day event with presentations, workshops and the chance to connect, learn and discuss all things PowerShell with those that have a real passion for this evolving technology. There will be no place like this to deep-dive PowerShell in all of its flavors and colors.

The conference languages are English and German. There are continuous main tracks in both languages, making sure you can follow the tracks in the language you feel most comfortable with.”

For more information on this event, feel free to follow the official account on Twitter and the Hashtag to stay on top of the announcements.

Links in this Article
PowerShell Conference EU
Twitter – @PSConfEU
Twitter – #PSConfEU

 

MSFest Prague 2015 – Slides and Code

MSFestBanner

At the end of November I had the pleasure to attend and speak at MSFest in Prague. This event aimed at the Czech IT Professional and Developer community had a wide variety of topics and I was asked to do two sessions on PowerShell. I presented the following two sessions:

  • PowerShell Security features and threat management
  • PowerShell Advanced Toolmaking

PowerShell Advanced Toolmaking

I have put the presentation and the code online in my Events GitHub repository.

All links in this article are available here:

Links in this Article
MS Fest Praha
Jaap Brasser – GitHub
MSFest Prague 2015 – Code and Slides