database-tools

Get Process Owners

One way to find out the owner of a process is to add the missing Owner property to process objects: $processes = Get-WmiObject Win32_Process -Filter...

read more

Creating New Objects

There is a powerful new way in PowerShell v.2 to create new objects from scratch: You should first get yourself an empty hash table object, then add...

read more

Exit a Script Immediately

Use the Exit statement if you run into a condition where a script should quit. The script breaks whenever you call exit from within your script. Add...

read more

Using Real Registry Keys

In PowerShell, you access registry keys through virtual drives like HKCU: (for HKEY_CURRENT_USER) and HKLM: (representing HKEY_LOCAL_MACHINE). You...

read more

Writing to the Registry

Adding or changing registry values is not always intuitive with PowerShell. Here is a function called Set-RegistryValue that will make your life...

read more

Reading Registry Values

In PowerShell, you will need to use one of the Registry virtual drives to read from the Windows Registry as it is - not always intuitive. Here are...

read more