database-tools

Take Advantage of Your Profile

When PowerShell launches, it automatically looks for a special autostart script. It does not exist by default and is different for each PowerShell...

Beware of -match

The -match operator is frequently used in scripts however not everyone seems to understand how it really works. It can be a really dangerous filter...

Avoid Add-Member (Part 3)

In the previous tip we looked at a number of clever alternatives to avoid Add-Member when creating your own new objects. While using hash tables to...

Avoid Add-Member (Part 2)

In the previous tip we looked at creating simple data objects, and it became evident that instead of using Add-Member, you can cast a hash table to...

Avoid Add-Member (Part 1)

Often the cmdlet Add-Member is used to create simple objects like this: $user = New-Object -TypeName psobject | Add-Member -MemberType NoteProperty...

Important Keyboard Shortcuts

Two of the most important keyboard shortcuts in any PowerShell environment – whether console, ISE, or VSCode – are TAB and CTRL+SPACE. TAB triggers...

Outputting Color

Occasionally, PowerShell code is supposed to output warnings and reports, so colors can add more readability to it. Traditionally, PowerShell...

Better PowerShell Prompts (Part 2)

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...

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

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...

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...

1 6 7 8 9 10 159