PowerShell PotLuck - July 2025
Time to wrap up another month of PowerShell. This end of the month roundup also gives you a chance to give your brain a break and catch up on some of the latest PowerShell news, tips, and tricks.
Validating JSON
This first item is something I probably should have shared last month. You know I've recommended the PowerShell Podcast before. The host, Andrew Pla, also holds a weekly meetup called PowerShell Wednesday in the PDQ Discord server. In June, Andrew had Gilbert Sanchez as a guest to talk about validating JSON with PowerShell. I found this informative, so I wanted to share it with you.
You can watch the recording on YouTube: https://www.youtube.com/watch?v=xIbld0u34aY
TerminalTrove
You know I spend most of my day in front of a command prompt. As such, I am always looking for ways to extend my console experience. Recently, I heard about a source of console and terminal-based tools called Terminal Trove. This site has a wide collection of tools for various platforms, including Windows, Linux, and macOS. For Windows users, take a look at the Windows category.
I found a couple of interesting tools. Many of these require scoop to install. Here are a few tools I am trying out:
Disk Usage Free (duf)
This is a quick install using scoop.
scoop install duf

No, this isn't PowerShell, but it sure is a nice tool for quickly checking disk usage. Run duf --help
to see command options. Although, because the command can export data in JSON format, you can use PowerShell to process the output. For example, you can run:
PS C:\> duf -json | ConvertFrom-Json
device : Windows
device_type : local
mount_point : C:\
fs_type : NTFS
type : NTFS
opts :
total : 509722226688
free : 297785368576
used : 211936858112
inodes : 0
inodes_free : 0
inodes_used : 0
blocks : 124443903
block_size : 4096
device : Google Drive
device_type : local
mount_point : G:\
fs_type : FAT32
type : FAT32
opts :
total : 16106127360
free : 9307803648
used : 6798323712
inodes : 0
inodes_free : 0
inodes_used : 0
blocks : 31457280
block_size : 512
btop
I also installed this.
scoop install btop

This is nothing new to Linux users, and I've often thought about writing a PowerShell solution. But why bother when this is just as good as anything I could write?
I'm sure if you poke around the Terminal Trove site, you'll find other interesting tools. I'd love to hear about what you find useful.
PSConfEU 2025 Session Recordings
I am very disappointed that my travel plans fell apart and that I could not attend PSConfEU 2025 in person. However, I can at least get caught up on content that I missed. Session recordings are being published to YouTube. They have even provided a playlist to make it easier to find the sessions you want to watch.
You might also be interested in this excellent recap of the event. If this sounds like fun to you, keep an eye out for when tickets go on sale for next year's PowerShell Global Summit in Bellevue, WA.
Resume as Code
I mentioned Gilbert Sanchez earlier. Here's another resource from him that I think is worth sharing. Gilbert has a blog post about Resume as Code. He has a solution that you can install where you maintain your resume information in JSON. You can then render it as an HTML document and share it online. If I wasn't in the tail-end of my career, I would definitely be adopting this solution.
Automating Microsoft 365 with PowerShell Second Edition
If your day job involves Microsoft 365, you might want to check out the second edition of Automating Microsoft 365 with PowerShell. This book is a comprehensive guide to using PowerShell for automating tasks in Microsoft 365. The second edition includes updates and new content that reflects the latest changes in the platform.
Regex with Log Files
Another video that came across my virtual desk this month is from Guy Leech. In this video, Guy demonstrates how to use PowerShell to parse log files using regular expressions. I like the way Guy slowly builds up the regex solution and carefully explains each step of the process. Take a few minutes to watch https://www.youtube.com/watch?v=IbbqB6ZGGT8.
Platyps 1.0.0
Within the last week or so Microsoft released the long awaited 1.0.0 version of PlatyPS. This is the PowerShell module that allows you to create and maintain markdown-based help files for your PowerShell modules that can be exported to the XML-based help format. This is the module I use in my module development process.
You can install it using the following command:
Install-PSResource -Name Microsoft.PowerShell.PlatyPS
The module has a new name so you could run it side-by-side with the older Platyps module. Going forward, this is the module you will want to use. The new module is a major rewrite of the original PlatyPS module so expect a learning curve to adapt your existing workflows to the new module. When you install the module, you will also need to update the help.
Update-Help -Module Microsoft.PowerShell.PlatyPS -Force
You can also find the documentation online. Some of the help examples need to be updated but there should be enough information to get you started. I'll write a more detailed article later about using the module. If you want to learn more, take a look at project's GitHub repository.
Scripting Challenge
Finally, I couldn't leave the month without a scripting challenge. These are terrific learning opportunities and a chance to build you PowerShell scripting skills. The challenge involves several parts. Try to accomplish as much as you can.
For the first part, Write a PowerShell function that accepts a computername and credential
as parameters. Using CIM, query all processes, excluding the System
and System Idle
processes, on the specified computer. The output should include the following information::
- Computername
- ProcessName
- ProcessID
- WorkingSetSize
- the command line used to launch the process
- the process start time
For the second part, revise the function so that it include the process owner name in the domain\user name format and how long the process has been running. Hint: You will likely need to invoke a WMI/CIM method to get the process owner.
For the third part, using your solution and the HTML reporting content from this month, create an HTML report with as many reporting features as you can implement. The HTML report should include sections for:
- Showing the top 10 processes based on WorkingSetSize
- Showing the top 10 processes by running time
- Showing process information grouped by process owner
For bonus points, create a custom format XML file for your function that formats the WorkingSetSize in MB to two decimal places. You might also consider creating named custom table and/or list views.
Good luck!