September 2026 PowerShell Potluck
In this issue:
- Adding Value to PowerShell Functions
- Git Tips
- Zippy
- PSConfEU MiniCon
- PSConfEU 2027
- Scripting Challenge
- Summary
Thanks for hanging out with me this month. I hope you picked up a few useful tidbits of PowerShell knowledge that will make your work a little easier, or maybe a little more enjoyable. Let's wrap up the month with a little potluck.
I realize non-North American readers may not be familiar with the concept of a "potluck" so this Wikipedia link might help.
Adding Value to PowerShell Functions
First, a reminder that will be presenting later this week at the PowerShell Ohio User Group on 1 October at 19:00 Eastern. I will be talking about ways to add value to your PowerShell functions. I have a lot of cool demos lined up. If you can't make it, I think the meeting will be recorded and I'll share a link when I have one.
The event is free but you need to register at https://www.meetup.com/powershellohio/events/316581155/.
Git Tips
Last month I shared information on a module offering PowerShell tips. This month, I have a GitHub repo that will do the same thing for git. The best way to use this resource is to clone the GitHub repository from https://github.com/git-tips/tips to your desktop using the GitHub CLI
gh repo clone git-tips/tips
Tips are stored in a JSON file. There are 200 tips.
PS C:\Scripts\tips> Get-Content .\tips.json | ConvertFrom-Json | Get-Random -Count 1 | Format-List
title : Get list of all remote references
tip : git remote
alternatives : {git remote show}
category : Remotes
In my VSCode PowerShell profile script, I call this script file to display a random git tip.
#requires -version 5.1
# Show-GitTip.ps1
<#
Display a random Git tip of the day to the console.
This script does not write anything to the pipeline.
You will need to clone or download the git-tips project locally
from https://github.com/git-tips
#>
[cmdletbinding()]
Param(
[Parameter(Position = 0, HelpMessage = 'The path to a json file with git tips')]
[ValidateScript({
if (Test-Path $_) {
$True
}
else {
Throw "Cannot validate path $_"
}
})]
[string]$Path = 'c:\scripts\tips\tips.json'
)
Begin {
Write-Verbose "[BEGIN ] Starting: $($MyInvocation.MyCommand)"
} #begin
Process {
Write-Host 'Git Tip -> ' -ForegroundColor yellow -NoNewline
#Get a random tip
Write-Verbose "[PROCESS] Selecting a random tip from $path"
Get-Content -Path $path | ConvertFrom-Json |
Get-Random -Count 1 |
ForEach-Object {
Write-Host "$($_.Title): " -ForegroundColor Green
Write-Host $_.tip.split("`n")
#write a blank line
Write-Host ' '
}
} #process
End {
Write-Verbose "[END ] Ending: $($MyInvocation.MyCommand)"
} #end
This is something I put together back in the days of PowerShell v4, but it still gets the job done.

Of course, there's no limit to how you might want to format and display a tip.
Keep in mind that this is a GitHub repository, so you'll need to run git fetch and git pull periodically.
Zippy
During my meanderings this month, I came across an intriguing PowerShell module. Frankly, I'm not entirely sure how I would use it, but maybe you have some ideas. The Zippy module contains two commands, Compress-Zippy and Expand-Zippy. However, this module isn't intended to create file archives, but rather it allows you to compress content. This content could be the contents of a file or a memory stream.
To get started, install the module from the PowerShell Gallery.
Install-PSResource Zippy
The compression command has a relatively simply syntax.
PS C:\> Get-Command Compress-Zippy -Syntax
Compress-Zippy [[-Text] <string>] [-Algorithm <string>] [-Encoding <Encoding>] [-CompressionLevel <CompressionLevel>] [-AsByteStream] [<CommonParameters>]
Compress-Zippy [-Bytes <byte[]>] [-Algorithm <string>] [-Encoding <Encoding>] [-CompressionLevel <CompressionLevel>] [-AsByteStream] [<CommonParameters>]
Compress-Zippy [-Stream <Stream>] [-Algorithm <string>] [-Encoding <Encoding>] [-CompressionLevel <CompressionLevel>] [-AsByteStream] [<CommonParameters>]
Zippy supports four compression algorithms:
In my testing, the default algorithm is just fine.
You can also specify a compression level from the System.IO.Compression class.
PS C:\> Get-TypeMember System.IO.Compression.CompressionLevel
Type: System.IO.Compression.CompressionLevel
Name MemberType ResultType IsStatic IsEnum
---- ---------- ---------- -------- ------
Fastest Field System.IO.Compression.CompressionLevel True
NoCompression Field System.IO.Compression.CompressionLevel True
Optimal Field System.IO.Compression.CompressionLevel True
SmallestSize Field System.IO.Compression.CompressionLevel True
GetType Method Type
HasFlag Method Boolean
ToString Method String
You've seen me use Get-TypeMember from the PSScriptTools module in the past. The default compression level is fastest.
The Compress-Zippy doesn't create files. By default it outputs compressed data as a Base64 string.
PS C:\> Compress-Zippy -text "I am the compressed walrus"
iwyASSBhbSB0aGUgY29tcHJlc3NlZCB3YWxydXMD
You can also create a stream of bytes:
PS C:\> Compress-Zippy -text "I am the compressed walrus" -AsByteStream
139
12
128
73
32
...
It is simple enough to test the entire process.
PS C:\> Compress-zippy -text "I am the compressed walrus" -AsByteStream | Expand-Zippy
I am the compressed walrus
What I'm not sure of is what problem this is solving for me. I suppose compressing data is more network friendly. I could compress a file:
Compress-Zippy (Get-Content c:\scripts\backup.ps1 | Out-String) -CompressionLevel SmallestSize | Out-File c:\temp\backup.zip
And then copy the file using PowerShell remoting where I could expand it on the remote side.
Invoke-Command {
Expand-Zippy -CompressedData (Get-Content c:\temp\backup.zip) |
Out-File C:\temp\backup.ps1
. c:\temp\backup.ps1
Invoke-LocalBackup
} -session $s
While not truly secure, compressing a string to a base64 string shields it from prying eyes. Compressing to a string of bytes is even better. A casual user won't know what to do with it.
But, I'm going to keep this module in mind and see if I can find a place for it in my work. If you have a use case, please leave an online comment in the archives.
PSConfEU MiniCon
If you couldn't attend the PowerShell Summit or PSConfEU this year, there's still time to learn and see what you've been missing. The PSConfEU people also run a free one-day virtual conference called the PSConfEU MiniCon. This year's event is 13 October. The session schedule is still being finalized but you can see what is slated so far at https://synedgy.com/psconfeu-minicon/. #minicon-schedule.
The event takes place in a virtual environment that allows you to move between stages and interact with attendees.
The event is free but you need to register. And if I recall, sessions are recorded and eventually published on YouTube. You can find last year's playlist in the PSConfEU YouTube channel
PSConfEU 2027
It is never to early to begin planning for events. While they didn't announce a location, the folks behind PSConfEU have announce the event dates. Mark your calendars for 21-24 June 2027. If you visit the site you can register for the location announcement. This is a very popular and very well run event with an enormous amount of technical content that you can use immediately.
Scripting Challenge
And don't think you're getting away without a PowerShell scripting challenge. I'm sure you can find scripts and tools online that will accomplish the targeted task, but the point is to see how you would approach the problem.
Write a PowerShell function that will take the output of a command and create a Markdown-formatted table. The property names should be the column headings. As a bonus challenge, add support to let the user specify alignment on specific headings. If you are new to Markdown, the first thing you'll have to discover is the syntax to display a table.
For the sake of the exercise, you'll want to use an object that doesn't have too many property names.
Summary
The days are flying by and there never seems to be enough time to get everything done, even using PowerShell. But we'll push on with more content next month and strive to do even better.
Add a comment: