In the previous tip we illustrated how you can define your own “prompt” function to customize the PowerShell prompt. One useful item could be to...
Powershell
Better PowerShell Prompts (Part 1)
I know today’s tip isn’t brand new but considering how many people start using PowerShell, it’s worth mentioning again. By default, the PowerShell...
Reading Recently Installed Software (Improvement #3)
When reading event log data with Get-WinEvent, in the previous tip we explained how you can use the “Properties” property to extract the...
Reading Recently Installed Software (Improvement #2)
In the previous tip we used Get-WinEvent to read the Windows event log system and get a list of recently installed software, then used Select-Object...
Reading Recently Installed Software (Improvement #1)
In the previous tip we used Get-WinEvent to read the Windows event log system and get a list of recently installed software, similar to this:...
Reading Recently Installed Software
The MSI installer logs all successful software installation to the Windows event log system. Here is a one-liner that can read back that...
Gathering Forensic Process Info
In order to better understand the processes that run on a server, and possibly identify traces of unwanted processes, PowerShell can dump forensic...
Logging Variable Types
As part of your debugging and quality control you may want to log the data that gets assigned to individual variables. For example, you may want to...
Converting Language IDs in Language Names
In our previous mini series we showed different approaches to get to the names of installed OS languages using different PowerShell methods. The...
Determining Language Packs (Part 3)
In part 2 of this series, you already witnessed how much easier and faster it was to query the list of installed operating system languages using...
Determining Language Packs (Part 2)
In part 2 of this series, we’d like to solve our puzzle – getting installed language packs – by using the built-in PowerShell features. In part 1 we...
Determining Language Packs (Part 1)
Let’s assume you need to find the installed language packs for a Windows machine. In this three-part series, we use PowerShell’s features to tackle...
Creating World Map Graphs
If you have data related to countries, you may want to visualize and highlight this geographic data. Classic bar- and chart-graphs won’t always work...
Running $PSScriptRoot in Selected Code
One of the big pitfalls in PowerShell code is the automatic variable $PSScriptRoot which always holds the path to the folder the current script is...
Pasting Multiple Lines in PowerShell
When you copy multiple lines of PowerShell code and paste them into a shell window, the result often is not what you expect. PowerShell starts...
Downloading Files
Simple file downloads can be done in a variety of ways, i.e., using Invoke-RestMethod, Invoke-WebRequest, or via the BitsTransfer module. If you...
Recovering Wasted Hard Drive Space
When software receives updates, it often does not clean up previous updates that are no longer required. These deprecated “patch files” accumulate...
Cleaning Up PowerShell Modules (Part 3)
In part 1 and 2 we looked at removing PowerShell modules altogether. In this last part we’ll look at PowerShell module versions you may no longer...
Cleaning Up PowerShell Modules (Part 2)
In part 1 we looked at removing PowerShell modules that were originally installed via “Install-Module”. You can as well remove PowerShell modules...
Cleaning Up PowerShell Modules (Part 1)
There are plenty of scripts available that promise to read the original Windows 10 product key from the registry by converting a series of binary...
Quickly Finding Outdated PowerShell Modules
In the most simplistic case, you can check all your installed modules for updates with just a one-liner (remove -WhatIf to actually perform the...
Unblocking Multiple Files
When you download files from the internet, or when you copy files from untrusted sources to an NTFS-formatted drive, Windows adds a secret NTFS...
Major Update for PowerShell Extensions
If you have tried VS Code in the past but were disappointed because of speed and stability, you may want to have a second look now. On May 3, Sydney...
Identifying Multi-Language Online Documents (Part 1)
In the previous tip we pointed you to the official PowerShell Language Definition which is available online in many different languages. Which...