database-tools

Understanding Text Conversions

There are many different ways how objects can be transformed into text. In case you sometimes get confused, here is a quick refresher. Take a look:...

Comparing String Lists

In a previous example we used HashSets to compare numeric lists, and find out which elements were found in both list, or in just one list. The same...

Comparing Numeric Lists

Often a script needs to find out whether two lists are the same, or which elements are missing from a list. Instead of investing much programming...

Tagging Objects Efficiently

Occasionally you see scripts that use Select-Object to append information to existing objects. This can look similar to the code below: Get-Process...

Toggling Comments in PowerShell ISE

The good old PowerShell ISE exposes some expandability connectors. If you’d like to toggle comments in selected text by pressing CTRL+K, for...

Converting Hash Tables to JSON

In previous scripts we worked a lot with hash tables, and even loaded them from .psd1 files. If you need the data in a different format, for example...

Reading Data from .PSD1 Files

There are many ways how a script can store data information. One is especially convenient. Here is the code: Import-LocalizedData -BaseDirectory...

Minimalistic Error Handling

Error handling does not necessarily have to be complex. It can be as simple as checking whether the last command executed successfully: # suppress...

Temporarily Disabling PSReadLine Module

Beginning in PowerShell 5, the PowerShell console features colorized text, and there is a wealth of other new features provided by a module named...

Getting File Extension

By converting a path to a FileInfo object, you can easily determine the path parent folder or file extension. Have a look:...

1 62 63 64 65 66 159