Behind the PowerShell Pipeline

Behind the PowerShell Pipeline

Archives
Log in
Subscribe
November 27, 2026

November 2026 PowerShell Potluck

In this issue:

  • Introduction
  • PowerShell 7 In Box
    • PowerShell ISE
    • PowerShell 7.7
  • Atomic PowerShell Scripting
  • PSOh.io
  • HashSets
  • Cleaning Windows
  • Scripting Challenge
  • Summary

Introduction

This was a crazy month for me with two conferences and a few family-related events. And of course, a lot happened in the PowerShell world so let's dig into this month's potluck roundup.

PowerShell 7 In Box

The major news this month is that PowerShell 7 is coming to Windows as part of the operating system. This has been something the PowerShell community has wanted for a long time. Many organizations face challenges getting approval for software or applications that don't ship with Windows. This change should alleviate those concerns.

As outlined in the public announcement, PowerShell 7 will be included by default in the next major release of Windows Server. What I don't know is what remoting protocol will be enabled by default. I suspect it might be ssh. On the client side, I think we'll see PowerShell 7 on whatever client OS is released around the same time. This might be some version of Windows 11 or whatever Microsoft might have planned next.

Part of this announcement includes notice that Windows PowerShell 5.1 is now officially deprecated. Windows Server 2025 will be the last version to include Windows PowerShell 5.1. After that PS 5.1 will become a feature on demand, similar to what happened with PowerShell 2.0. Eventually, it will be removed altogether. This is why I suspect ssh will be the new default protocol because I expect WSMan to also eventually fade away.

This means that you need to begin the process, if you haven't already, of migrating your production PowerShell scripting and automation to PowerShell 7. You can find some tips on this process in the Microsoft announcements and documentation. I think I'll devote a few upcoming newsletters to the topic as well.

PowerShell ISE

If it isn't clear from the announcement, you should also consider the PowerShell ISE deprecated and obsolete. It has been this way for awhile and you have migrated to newer and better solutions such as VS Code. The PowerShell ISE doesn't support PowerShell 7, however if you struggle to give up the ISE, take a look at ISEBerg from Adam Driscoll. This is a modern PowerShell ISE replacement that supports PowerShell 7. For now, you will have to download an installation asset from GitHub. In any event, if you haven't done so, you need to break your dependency on the PowerShell ISE.

PowerShell 7.7

On a related note, Microsoft also released PowerShell 7.7, but with one major provision. This is the first version to use the msix format. There is no msi install option. The PowerShell team told us this was coming. There are potentially breaking changes with this format which the team is well aware of and is tracking. The goal is to address the blocking issues by the time of general availability in Windows.

As such, you might want to skip PowerShell updates until some of the msix blocking issues have been addressed. PowerShell 7.6 is the long term servicing branch (LTS) anyway, so I expect many of you won't be updating until PowerShell 7.8 which will be the next LTS release. I intend to skip PowerShell 7.7 and later releases until some of the msix shortcomings have been addressed.

Some of you might want to test PowerShell 7.7 to see if it has a negative impact or find workarounds, especially if there are bug fixes in 7.7 that you need to take advantage of.

Atomic PowerShell Scripting

I came across an interesting article earlier this week about atomic scripting. This is a way of writing PowerShell scripts that ensure file system changes are committed before continuing. The concept is that if your script is interrupted during processing, file changes aren't left in an intermittent state.

The solution code is essentially an equivalent to transactions. In Windows PowerShell 5.1 we could use transactions when making changes to the registry. This ensured that all changes were made or no changes were made. Sadly, transaction support never made it to the file system, where we really needed it, and registry support was removed in PowerShell 7.

If you think you need this kind of support in your PowerShell scripting, take a look at https://www.dowst.dev/atomic-writes-how-to-stop-your-scripts-from-destroying-perfectly-good-files/.

PSOh.io

A few months ago I presented for the PSOH.io PowerShell user group. I spoke about adding value to your PowerShell functions. The video recording of the presentation is now available online at https://www.youtube.com/watch?v=-p2Y9DXD1EE.

My presentation used an older Jupyter notebook, but I've exported the notebook to an HTML file to make it easier to follow. I've published all the source material on GitHub at phttps://github.com/jdhitsolutions/adding-value-to-powershell-functions.

HashSets

I always learn new things from Matthew Dowst. I've long used generic collections in my scripting. Now I know there may be situations to use a generic HashSet. This is a special type of collection that offers a variety of benefits, especially for very large sets.

Rather than repeat some of his code here I encourage you to take look at https://www.dowst.dev/why-hashset-might-be-your-new-favorite-collection/. Pay close attention to the case-sensitivity detail.

Now I just have to remember to use this when the right situation arises.

Cleaning Windows

That last PowerShell tidbit is an article I read about using PowerShell to clean up or optimize a Windows installation. These aren't commands to get rid of unwanted applications. That is easily done with Remove-AppxPackage:

Get-AppxPackage Microsoft.Todos | Remove-AppPackage

Disabling optional features:

Disable-WindowsOptionalFeature -Online -NoRestart -FeatureName Recall

Or removing a capability:

Remove-WindowsCapability -Online -Name 'App.StepsRecorder~~~~0.0.1.0'

But there are periodic housekeeping commands you might want to run that will clean up your Windows installation. Take a look at https://www.fdaytalk.com/powershell-commands-to-clean-up-windows/. Before you get carried away with the commands, I encourage you to test them on a non-production system, or at least have a backup or roll-back plan.

Scripting Challenge

Let's wrap up the month with your next scripting challenge. I don't think this will be especially difficult, and in fact I'm not even going to give you a starting point. Figuring out where to begin is part of the process.

Your challenge is to write a PowerShell function to query a remote computer and retrieve information regarding the local user profiles. Your command should write an object to the pipeline with this information:

  • the user name
  • the account SID
  • the total size of the profile directory
  • the last use datetime
  • the last use age (as a time span)
  • whether the profile is a system or service account
  • if roaming is configured
  • the computername

If you can include custom formatting, even better. It isn't part of the challenge, but you should write your code so that it testable using Pester. Remember that the reward is in the journey, not necessarily destination.

Summary

And that should wrap up November. I hoped you learned a few things this month and remain committed to improving your skills and enhancing your knowledge. We'll continue the journey next month.

(c) 2022-2025 JDH Information Technology Solutions, Inc. - all rights reserved
Don't miss what's next. Subscribe to Behind the PowerShell Pipeline:
Older → Solving The PowerShell File Class Challenge

Add a comment:

Posting this comment will subscribe you to this newsletter with the email address you enter.
Share this email:
Share on LinkedIn Share on Mastodon Share on Bluesky
GitHub
Bluesky
LinkedIn
Mastodon
jdhitsolutions.github.io
Powered by Buttondown, the easiest way to start and grow your newsletter.