You may find that Vista's new Instant Search can sometimes get out of hand and slow down your machine. Temporarily disabling and then stopping...
database-tools
Accessing Static .NET
You can start to explore the power of .NET with PowerShell's built-in .NET access.. All you will need are square brackets to access static...
Arrays of Strings
In PowerShell, you can multiply strings: the string is repeated which can be useful for creating separators: '-' * 50 This works for words,...
Quick Loops
Normally, creating a simple loop in PowerShell can be a bit awkward: for ($x=
Understanding Exceptions (and why you can’t catch some errors)
Traps are a great way of catching exceptions and handling errors manually but this does not seem to work all of the time. This example catches the...
Understanding Trap Scope
Traps are a great way of handling errors but you may want to control where PowerShell continues once an error occurs. There is a simple rule: a trap...
Using Traps and Error Handling
Traps are exception handlers that help you catch errors and handle them according to your needs. A Trap statement anywhere in your script: Trap {...
Show Battery Status as Prompt
The PowerShell console prompt can be easily changed by simply changing the prompt function to change the prompt text. If you are working with a...
Validate User Input
When you ask users for input you never know what they enter so it is a good idea to validate user input before using it. A great and easy way to do...
Multidimensional Arrays
PowerShell supports two types of multi-dimensional arrays: jagged arrays and true multidimensional arrays. Jagged arrays are normal PowerShell...
Manipulating Arrays Effectively
While you can add and remove array elements with PowerShell arrays, this is an expensive operation and not recommended with large numbers of...
Using COM Objects to Say "Hi!"
If you have ever written scripts using VBScript, you probably know COM objects which are DLLs and work like command libraries. You can use COM...