The other day, during one of the monthly #PSTweetChat sessions, I exchanged some tweets with Joshua King. We got on the topic of countdown timers and he shared some code he uses for his YouTube channel. The command creates a progress bar and counts down, displaying some humorous messages along the way. There’s absolutely nothing…
Tag: Scripting
Who is Running Your PowerShell Script?
I’ve often talked about the benefit of including Verbose output in your PowerShell scripts and functions from the very beginning. This is especially helpful when someone else is running your command but encounters a problem. You can have them start a transcript, run your command with –Verbose, close the transcript and send it to you….
A PowerShell Module for your Type Extensions
If you’ve been following this blog recently, you’ve read about my fun with PowerShell type extensions. This technique lets you make PowerShell give you the information you want without a lot of work on your part. Well, there is some work but you only have to do it once. To make it even easier, I…
Sending Files to Your Browser with PowerShell
Over the course of the last year I’ve been using markdown files much more, especially as part of the Platyps module. Even though I have a markdown editor and I can also preview files in VS Code, sometimes I want to see the file in my browser which has a markdown viewer plugin. Or I…
PowerShell Pop Quiz
I’m always looking for ways to help teach PowerShell and the other day I thought why not have PowerShell teach you itself? I have created a PowerShell script that dynamically generates a quiz on cmdlets and functions installed on your computer. In short the quiz question shows you a command synopsis and then presents a…
Get Git with PowerShell
If you are creating PowerShell scripts, tools or modules today, you are most likely using Git. What? You’re not? Is it because you haven’t gotten around to installing it? I have some “quick and dirty” PowerShell hacks to help you out on Windows systems. Linux boys and girls already know what to do.
Throwing the Kitchen Sink at PowerShell
The other day I was watching a good intro video from Shane Young on getting started with PowerShell profiles. I use profile scripts extensively, and they can be extremely useful in configuring your PowerShell experience. One element you could add to your profile is a customized PowerShell prompt. Microsoft provides one by default. It creates…
Friday Fun: PowerShell Anagrams
Maybe it’s my liberal arts background but I love words and word games. I have a constant pile of crosswords and enjoy tormenting my kids (and wife) with puns. I am also fascinated with word hacks like palindromes and anagrams. An anagram is where you take a word like ‘pot’ and rearrange the letters to…
Friday Fun: Listing WMI Namespaces
Welcome once again to the end of the week. Hopefully you spent some time in PowerShell. If not, perhaps this tidbit will be intriguing enough to give it a try. I always try to put the “fun” in function and today I have one that will enumerate all the WMI namespaces, but using Get-CimInstance, or…
PowerShell Summit 2017 Demo Files
During the recent PowerShell+DevOps Global Summit I had two primary presentations, that is, traditional sessions with slides and demos. My other sessions were panels which means if you weren’t in the room you missed out on some great content and interaction. Anyway….my main sessions were on creating class-based PowerShell tools and using Nano server in…
Friday Fun: Crossing the Border with PowerShell
Today’s Friday Fun post, as most of these are, is a little silly and a little educational. Because I obviously am avoiding getting any real work accomplished, I worked on a little project that would add a border around a string of text. I often write formatted text to the screen to display information and…
PowerShell Scripting and Toolmaking – The Last Book You Will Ever Need
At long last it is finished! Don Jones and I have recently published the first iteration of The PowerShell Scripting and Toolmaking Book. This project was first announced in January 2017 with an early release program. The first edition was finished and in reader’s hands by the end of February 2017. We appreciate all of…
Creating a Github Gist with PowerShell
Recently I posted a PowerShell tool for creating a GitHub repository. In continuing my exploration of the GitHub API I wrote another PowerShell tool to create a GitHub gist. A gist is simple way to store and share snippets or code samples. I use them to share simple PowerShell scripts or other works that aren’t…
A Classy Christmas PowerShell Module
Yesterday I showed you a class-based PowerShell script. My intention was to have a little bit of fun and teach you the basics of using a class. But what I gave you was really just the first step. If you wanted to create an actual tool around a class, you will most likely want to…
Are You My Nano?
I’ve been diving a bit deeper into the Nano waters now that Windows Server 2016 is out the door. As I deployed a few servers I realized there was a potential long-term management issue. During the technical preview, Nano installations were recognized by their Tuva designation. But now, a Nano server is just another Windows…