database-tools

Use Ctrl+Space in ISE!

The PowerShell ISE opens IntelliSense menus frequenty and helps you write code. Sometimes, however, IntelliSense does not pop up automatically,...

read more

PowerShell Killing Itself

If you schedule a script as a scheduled task, or call it externally, and want to make sure the PowerShell process really ends, here is a brute force...

read more

Invoking Code Repeatedly

Sometimes you might want to run some command multiple times until it runs successfully. Here is a function that shows a way to do this: #requires...

read more

Saving Persistent Data

Sometimes a script needs to save information in a persistent way. Maybe you have a list of computers that you'd want to contact, but only some...

read more

Use WMI the Modern Way!

WMI is a powerful technique to find out information about local or remote computers, and you may have used Get-WmiObject before to do so (if not,...

read more

Using .NET Types Directly

Cmdlets contain pure .NET code, so thanks to cmdlets, you do not need to directly touch .NET code. You can, however. Here are a number of sample...

read more

Getting an Excuse

Here is a quick way of getting a good excuse - provided you have Internet access: #requires -Version 3 function Get-Excuse { $url =...

read more

Who Is Listening? (Part 1)

The good oldfashioned netstat.exe can tell you the ports that applications listen on. The result is plain-text, though. PowerShell can use regular...

read more

Sending Objects to Notepad

In a previous tip we showed how you can send text to a fresh Notepad instance. Today, you get an enhanced version of Out-Notepad: you can pipe...

read more

Send Text to Notepad

Notepad can be used to display text results. Typically, you would need to save text results to file, then have Notepad open that file. There is a...

read more

Magic Underscore Variable

Here is a very special (and very underdocumented) way to use PowerShell parameters. Have a look at this function: #requires -Version 2 function...

read more

Converting Currencies

PowerShell is an extremely powerful language and can access web services and web pages. If you combine that with dynamic parameters, you get a...

read more