database-tools

Remove Recents Folder

Windows uses the special recents folder to remember which files you have opened. You can have a look to check what Windows has stored: Dir...

read more

Displaying Hex Dumps

PowerShell can read plain text, but it can also read binary content. Here is a little function that creates a "hex dump" of any binary...

read more

Working with Path Names

The .NET System.IO.Path class has a number of very useful static methods that you can use to extract file extensions. Here is how you can get a list...

read more

Lowering Process Priority

Sometimes, you may want to lower process priority for some processes. That's a PowerShell one liner. Note that the next line lowers priority for...

read more

Calling ChkDsk via WMI

Some WMI classes contain methods that you can call to invoke some action. For example, the next line initiates a disk check on drive D:...

read more

Rename Drive Label

WMI can also read any drive label (the name that appears next to a drive inside Explorer), and you can change the drive label, too—provided...

read more

Remove Empty Entries

One little known fact is that Where-Object is a cool and simple way of removing empty objects. Let's say you want to list all network adapters...

read more

Use PowerShell Cmdlets!

Whenever possible, try to avoid raw .NET access if you would like to create more readable code. For example, the following line returns the current...

read more