database-tools

Getting Image Details

PowerShell can access COM-Objects as there are many useful objects present on a system. For example, WIA.Image can return all kinds of useful...

read more

Picking Random Items

In PowerShell V2, Get-Random retrieves as many random numbers as you like, allowing you to use this random number generator in many scenarios. A...

read more

Restarting Processes

You may want to occasionally restart a single-instance process. However, shutting down a process does not necessarily mean it is killed in that...

read more

Finding Unwanted Output

PowerShell has an extremely flexible way of submitting return values. Instead of explicitly setting the return value of a function, PowerShell...

read more

Deleting Event Logs

Working with event logs has become a lot easier in PowerShell v.2, and you have seen how you create and maintain your own logs. So, if you'd...

read more

Creating Your Own Eventlog

In PowerShell v.2, it is very easy to create and maintain your very own event logs to track errors in your scripts or other automation solutions....

read more

Updating PowerShell Modules

In a previous tip, you learned about the new modules in PowerShell v.2, which can be loaded using Import-Module. Once you have loaded a module, it...

read more

Creating Script Modules

In PowerShell v.2, there is a new feature called "module," which is a file with the extension .psm1 and behaves almost exactly like a...

read more

Trap and Try/Catch

Trap, which has been around since PowerShell v.1, is designed to catch errors and works like this: trap { Write-Host -foregroundcolor Yellow `...

read more

Is PowerShell Available?

As PowerShell becomes more important, you may want to automatically check whether it is available on a machine. To determine whether any PowerShell...

read more