Last year I released a PowerShell module called PSClock. The module contains a command to create a transparent WPF form displaying a clock. Shortly after, someone posted a request for a countdown timer. Not an unreasonable request and one I finally got around to implementing. However, I already had a module with a number of…
Tag: WPF
Even More Colorful Fun with PowerShell and WPF
Let’s continue looking at how to use PowerShell and a Windows Presentation Foundation (WPF) form to display [System.Drawing.Color] values. This article builds on an earlier post so if you missed it, take a few minutes to get caught up. As I did earlier, before running any WPF code in PowerShell, you should load the required…
More Colorful Fun with PowerShell
In my last Friday Fun post, I shared some PowerShell code for displaying [System.Drawing.Color] values from a console using ANSI escape sequences. After I published the article, I realized what I really wanted was a color palette display that wouldn’t be affected by the console background. A Windows Presentation Foundation (WPF) form would do the…
Creating a PowerShell Clock
I’ve published a new project to the PowerShell Gallery. This is something that I needed, and maybe you do as well. Even though I have the typical clock running in the Windows taskbar, I have an ultrawide monitor so it isn’t always easy to read. I had been running the xclock app from WSL which…
Generate PowerShell Dynamic Parameter Code
One of the topics we’ve discussed in the PowerShell Cmdlet Working Group is a request to make it easier to insert dynamic parameters. I am a bit torn on this. On one hand, I see the value in dynamic parameters. These are parameters that only exist if some condition is met, such as if the…
Tracing PowerShell with WPF
Back in my VBScript days, I had a script that would use Internet Explorer as a trace window. My script could run and messages would be written to an IE window. This was a handy way of separating debug or trace messages from the command output. When PowerShell came along I revised it. But IE…
The PowerShell Magic 8 Ball
[I updated this article to reflect minor changes in the code and the release of PowerShell 7. This article was originally published 28 October, 2019]. Last year I shared some PowerShell code on Twitter about this time of year. I have a short script that uses Windows Presentation Foundation (WPF) to create a spooky graphical…
A Better PowerShell WPF Grid Viewer
A while ago I added a command called ConvertTo-WPFGrid in my PSScriptTools module. I wanted something similar to Out-Gridview but done in a WPF form. The initial version was ok and got the job done but it always felt lacking. The new version of the command is greatly improved I think. I wanted to take…
Making Short Links Long with PowerShell and WPF
Sometimes, when I have nothing better to do, I kill some time giving Todd Klindt and Shane Young a hard time during their podcast. You should join me sometime. Anyway, during a recent show Todd mentioned a bit of PowerShell code he put together to resolve short links. You see these all the time in…
A PowerShell Input Tool
In PowerShell, the primary means to get interactive input from a user is with the Read-Host cmdlet. There’s nothing wrong with it but sometimes if you are using it in a graphical tool like the PowerShell ISE or VS Code you may not realize you are being prompted. Or perhaps you are building some other…
IT/Dev Connections 2016 Demos
I had a great time in Las Vegas a few weeks ago presenting at IT/Dev Connections. If you attended one of my sessions, thanks for taking the time. I hope found it time well spent. I tend to offer more demo-intensive presentations with minimal PowerPoint, which no one has complained about yet! In some of…
Remote PowerShell ISE Connections in Action
I’ve written a few times about my PowerShell module that makes it easier to create remote tabs in the PowerShell ISE. The module, ISERemoteTab, is available in the PowerShell gallery. I’ve also created a short video that demonstrates how to use it, especially the WPF form. I have a few more ideas for this project…
Formal Remote ISE Connections
I have updated my PowerShell tools that make it easier to open up a remote tab in the PowerShell ISE. The standard approach is limited and doesn’t allow for things like using SSL or different ports. I have had the ISERemoteTab project up on GitHub for awhile. I recently added a WPF-based form to make…
Friday Fun: PowerShell ISE Function Finder
At the PowerShell Deep Dive in San Diego, I did a lightning session showing off something I had been working on. Sometimes I don’t know what possesses me, but I felt the need for a better way to navigate my PowerShell scripts files that had many functions. Some files, especially modules, can get quite long…