database-tools

Using Default Parameters

If you find yourself always using the same parameter values over again, try using PowerShell default parameters. Here is how: # hash table # Key = #...

Database Performance History

Servers are moving from on-prem to the cloud.  Applications are upgraded, so are operating systems, databases, and hardware.  New users,...

Finding Executable for File

Most things can be handled by built-in PowerShell commands, but if that’s not enough, you can always resort to the internal Windows API. For...

Adding Leading Zeroes

If you need numbers with leading zeroes, for example for server names, here are two approaches. First, you can turn the number into a string, then...

Displaying Message Box

If you’d like to show a default MessageBox with some buttons for the user to click, try this function: function Show-MessageBox {...

Displaying Input Box

If you’d like to open a quick and dirty input box to prompt a user for some data, you could access Microsoft Visual Basic and...

Reading Text Files Fast

There are plenty of ways how PowerShell can read in text files, and they can differ considerably in time. Check for yourself. The examples below...

Reading Event Logs Smart (Part 2)

In the previous tip we illustrated how you can access detailed event log information that you retrieved via Get-EventLog by using...

Reading Event Logs Smart (Part 1)

When you query an event log with PowerShell, by default you get back a text message with the logged information. For example, if you’d like to know...

1 54 55 56 57 58 159