database-tools

Creating Great Reports

All PowerShell versions You can change all properties of objects when you clone them. Cloning objects can be done to “detach” the object...

read more

Accepting Multiple Input

All PowerShell versions When you create PowerShell functions, here is a template that defines a InputObject parameter that will accept multiple...

read more
DBAs and Dinosaurs

DBAs and Dinosaurs

You have to admit that title is catchier than yet another “Death of the DBA” blog.  And that was exactly the direction I was headed until I ran a...

read more

Using Default Parameters

In PowerShell 3.0, an option was added to define default values for arbitrary cmdlet parameters. This line, for example, would set the default value...

read more

Finding Working Days

To find all working days in a given month, here is a neat little one-liner: $month = 7 1..31 | ForEach-Object { Get-Date -Day $_ -Month $month } |...

read more

Speeding Up Background Jobs

Background jobs can be a great thing to speed up scripts because they can do things in parallel. However, background jobs only work well if the code...

read more

Using Nested Hash Tables

Nested hash tables can be a great alternative to multidimensional arrays. They can be used to store data sets in an easy-to-manage way. Have a look:...

read more

Speeding Up Arrays

When you assign new items to an array often, you may experience a performance problem. Here is a sample that illustrates how you should not do it:...

read more

Fun with Path Names

You can use the -split operator to easily split a path in its components. The result is always an array. Simply use comparison operators to exclude...

read more