database-tools

More Splitting Fun

In the previous tip, we explained how you can use a regular expression to split strings in groups of a given length. Let’s explore what else...

read more

Splitting Groups

All PowerShell Versions Ever wanted to split a string in chunks of a given length? Regular expressions can help. Here is an example that splits a...

read more

Safely Opening WPF Windows

In the previous tip we explained how you can create WPF-based windows in PowerShell. However, when you play with WPF code inside PowerShell ISE, it...

read more

Creating WPF Windows

WPF is a great technique to create user interfaces in PowerShell. Most of the window content can be defined using XAML, a description similar to...

read more

Saving Credentials

Here is a safe way of saving credentials to a file: $CredPath = "$home\Desktop\mycred.xml" Get-Credential | Export-Clixml -Path $CredPath...

read more

Clearing the Recycle Bin

A much awaited new cmdlet surfaced in PowerShell 5.0: Clear-RecycleBin! You can clear the recycle bin on a particular drive, or on all drives. This...

read more

Using Enumerations

Beginning with PowerShell 5.0, you can use the new keyword "enum" to create enumerations. They can be useful for parameter validation:...

read more

Reading Excel Cells

The fastest way to read data from an Excel spreadsheet is to export the data to CSV, then use Import-CSV. However, sometimes the data in an Excel...

read more

Accessing API Methods

PowerShell can use C# to define new .NET types that access the internal Windows API methods. Here is some code that makes accessible the...

read more