database-tools

Using the OpenFile Dialog

PowerShell 3.0 and newer Here’s a quick function that works both in the ISE editor and the PowerShell console in PowerShell 3.0 and above):...

read more

Logging What a Script Does

All PowerShell versions You probably know that in a PowerShell console (not the ISE editor), you can turn on logging: PS> Start-Transcript This...

read more

A Fun Beeping Prompt

All PowerShell versions If your computer has a sound card, here is a code snippet that will drive your colleagues nuts: function prompt { 1..3 |...

read more

Watch Out With UNC Paths!

All PowerShell versions Many cmdlets can deal with UNC paths, but using UNC paths can produce flaky scripts. Take a look at this: PS> Test-Path...

read more

Finding AD Users

All PowerShell versions Searching the AD can be done with simple calls provided you are logged on an Active Directory domain. In a previous tip we...

read more

Case-Correct Name Lists

All PowerShell versions Let’s assume it’s your job to update a list of names. Here is an approach that will make sure that only first letter in a...

read more

Hibernate System

All PowerShell versions Here is a simple system call that will hibernate a system (provided of course that hibernation is enabled): function...

read more

Recursing a Given Depth

PowerShell 3.0 and newer When you use Get-ChildItem to list folder content, you can add the –Recurse parameter to dive into all subfolders....

read more

Aliases Can Be Dangerous

All PowerShell versions Aliases enjoy the highest priority among executable commands in PowerShell, so if you have ambiguous commands, PowerShell...

read more