database-tools

Normalizing File Extensions

PowerShell 2.0 and later Let’s assume you want the user to submit a list of file extensions, or you are getting them from some other source....

Using the PowerShell ISE Debugger

PowerShell 3.0 and later Sometimes, it is hard to find out why a PowerShell script is not doing what it should do. To get a better understanding of...

Using Code Regions in ISE

PowerShell 3.0 and later PowerShell ISE already supports collapsible code regions. When you write functions, loops, or conditions, you will notice a...

Process Killer (and some gotchas)

PowerShell 3.0 and later In a previous tip we explained how you can turn Out-GridView into a selection dialog, and suggested a couple of ideas. One...

Out-GridView: Universal Dialog

PowerShell 3.0 and later By default, Out-GridView is a one-way road: you can pipe data into it and display it in a grid view window, but you cannot...

Finding All Stoppable Services

PowerShell 3.0 and later Get-Service lists all services installed on your computer. It has no parameter to select only running or stopped services,...

What You Know but Don't Know

How To Know What You Don’t Know - Path to the DBA World As a new DBA to a company it can be overwhelming and sometimes confusing on knowing where to...

Exporting Out-GridView Content

PowerShell 3.0 and later Out-GridView is a very useful cmdlet to output results to an extra window. Unlike outputting to the console, Out-GridView...

Getting a Clean PowerShell Environment

PowerShell 3.0 and later When you develop PowerShell scripts in the PowerShell ISE, you will probably make a lot of changes and revisions, and...

Find AD Replication Failures

Windows 8.1, Server 2012 R2 Investigating Active Directory replication failures becomes easy with Windows 8.1 and Server 2012 R2. A new cmdlet...

Useful Static .NET Methods

All Versions PowerShell can access static methods of .NET types. Here are some real world one-liners that can do a lot for you: [Math]::Round(7.9)...

Mandatory Parameters with a Dialog

All Versions Typically, when you declare a parameter as mandatory, and the user does not submit it, PowerShell takes care and prompts the user for...

Use Open File Dialog

All PowerShell versions To add some sophistication to your script, here is a simple function that opens the OpenFile dialog and lets the user pick a...

Managing Terminal Service Settings

ActiveDirectory Module Sometimes you may want to directly access properties related to the terminal service in an Active Directory account. Here is...

Credential Obfuscator

PowerShell ISE 3.0 and later While it is generally not recommended to hard code passwords in scripts, there are sometimes scenarios where this is...

Copying Command Line History

All PowerShell versions To preserve all the PowerShell commands that you entered in a PowerShell session, check out this one liner:...

Getting Computer Serial Number

All PowerShell versions In a previous tip we illustrated how you can take a DELL serial number and check online the warranty status. Other vendors...