database-tools

Formatting Date and Time (with Culture)

In the previous tip we illustrated how Get-Date can take a format string and convert DateTime values to strings. The string conversion always uses...

Formatting Date and Time

Formatting date and time to your needs is easy with the -Format parameter provided by Get-Date. You can use it either with the current date, or...

Printing Test Pages on Printers

Windows 10 and Windows Server 2016 come with extensive printer support thanks to the PrintManagement module. If you’d like to print official...

What are visual SQL tuning diagrams?

SQL queries are the primary mechanism to interact with databases. Therefore, ensuring that SQL queries perform well is essential. An important...

Accessing Event Logs Directly

With Get-EventLog, you can easily dump the content for any given event log, however if you’d like to directly access a given event log, you...

Using a Stop Watch

In PowerShell, to measure time, you can simply subtract datetime values from another: $Start = Get-Date $null = Read-Host -Prompt "Press ENTER...

Finding Open Firewall Ports

Here is a piece of PowerShell code that connects to the local firewall and dumps the open firewall ports: $firewall = New-object -ComObject...

Is GDPR a Grinch?

Most people know that GDPR went into effect in May of 2018. For those of you who don't know, GDPR was put in place to protect people's PII...

Executing Code with a Timeout (Part 2)

In the previous tip we implemented a timeout using PowerShell background jobs so you could set a maximum time some code was allowed to run before it...

1 47 48 49 50 51 159