database-tools

Launching Files

The most important rule: always specify either an absolute or relative file path to whatever you want to launch - except if the file is located in a...

read more

Getting Real Paths

PowerShell uses virtual drives, which sometimes have a close mapping to the "real" drives you see in Windows Explorer. However, sometimes...

read more

Deleting Things

To delete things in the file system, you normally use a command like "del", which is an alias and points to Remove-Item in PowerShell:...

read more

Secret -Force Switch

PowerShell automatically displays all object properties when you output the object to the console. Here is an example: Get-WmiObject win32_bios...

read more

List Local Groups

If you'd like to get a list of all local Groups on your computer, you can use this line: Get-WMIObject Win32_Group -filter...

read more

Working Remotely With WMI

PowerShell v1 has no support for working remotely but WMI natively is able to work on local or remote machines. Simply use the -computername...

read more

Deleting Shares

If you'd like to get rid of a file share, such as the one you created via WMI in our last tip, this is how you can do it: (Get-WMIObject...

read more

Finding CD-ROM Drives

You can find out whether a system has CD-Drives by using a little function that returns all drive letters from all CD Drives in your system:...

read more

Cloning Objects

As a rule of thumb, PowerShell creates real copies when you copy variables. So in the next example, changing the array in $a will not affect the...

read more

Expanding Group Results

Group-Object is perfect for grouping objects based on one or more properties. Once you group objects, you can then filter, or sort, based on their...

read more

Sort With PS Code

Sort-Object is a great and versatile cmdlet to sort anything you want. Simply specify the property or properties you want to use for sorting: Dir...

read more

Splitting Text Into Words

If you ever need to read in a file and split file content into words, there are a couple of gotchas to keep in mind. First off, remember that...

read more