database-tools

List Installed Software

Get-ItemProperty reads registry values. You can create a software inventory in just one line since it supports wildcards: Get-ItemProperty...

read more

Read Registry Values

You will find that reading Registry values is not always easy because the Registry is accessible only via the generic "drive" paradigm....

read more

Open Explorer

While the PowerShell console is great, it is sometimes just easier to switch to Windows Explorer. Here is the fastest way to open Explorer and show...

read more

Discovering Impact Level

In a previous tip, you learned how to use $ConfirmPreference to get a warning before a cmdlet actually changes your system. This was based on the...

read more

Hide Error Messages

You may already know that you can suppress error messages with the ErrorAction parameter, which is often a good idea. Take a look at this and then...

read more

Temporary File Name

Thanks to Get-Date, you can easily create unique temporary file names with a timestamp: (Get-Date -format 'yyyy-MM-dd hh-mm-ss') +...

read more

Stopping the Pipeline

Usually, once a pipeline runs, you cannot stop it prematurely, even if you already received the information you were seeking. Simply use this filter...

read more

Creating Large Dummy Files

Sometimes, it is more efficient to use existing console tools rather than PowerShell cmdlets. For example here is a way to create a large file for...

read more

Accessing Profile Scripts

Profile scripts are executed automatically when PowerShell starts. The paths to these scripts can be found in $profile: $profile | gm *Host* | % {...

read more

Listing Execution Policies

In PowerShell v.2, there are multiple execution policies. You should use this to view and check the settings: Get-ExecutionPolicy -List ReTweet this...

read more