Do you know the Risks to your Database?

Creating ISO Files

PowerShell can turn regular folders into ISO files. ISO files are binary files that can be mounted and then behave like a read-only CD-ROM drive. Create Your Own ISO Files In the past, ISO files were commonly used to mount installation media. Today, you can easily...

Do you know the Risks to your Database?

Determining Language Packs (Part 1)

Let’s assume you need to find the installed language packs for a Windows machine. In this three-part series, we use PowerShell’s features to tackle this problem. non-PowerShell command In part 1, we simply try and solve the issue by looking for a native non-PowerShell...

Do you know the Risks to your Database?

Running $PSScriptRoot in Selected Code

One of the big pitfalls in PowerShell code is the automatic variable $PSScriptRoot which always holds the path to the folder the current script is located. This however requires that (a) the current script is in fact already saved to file, and (b) you are executing...

Do you know the Risks to your Database?

Pasting Multiple Lines in PowerShell

Unexpected Behavior When Pasting Multiple Lines of PowerShell Code When you copy multiple lines of PowerShell code and paste them into a shell window, the result often is not what you expect. PowerShell starts executing the first line and won’t execute the pasted code...

Do you know the Risks to your Database?

Cleaning Up PowerShell Modules (Part 2)

In part 1 we looked at removing PowerShell modules that were originally installed via “Install-Module”. You can as well remove PowerShell modules manually if you no longer need them. After all, they are just folders. PowerShell Modules Here’s code that lists all...

Do you know the Risks to your Database?

Cleaning Up PowerShell Modules (Part 1)

There are plenty of scripts available that promise to read the original Windows 10 product key from the registry by converting a series of binary values. In the first part of this mini-series, we’ll check out where PowerShell keeps its modules, and what you can do to...

Do you know the Risks to your Database?

Quickly Finding Outdated PowerShell Modules

In the most simplistic case, you can check all your installed modules for updates with just a one-liner (remove -WhatIf to actually perform the update): PS C:\> Get-InstalledModule | Update-Module -WhatIf Get-InstalledModule lists all modules that were installed in...

Do you know the Risks to your Database?

Analyze blocking for SQL Server

Blocking is a normal activity that occurs in SQL Server and it does that to control data integrity and make sure only one resource can change a set of data at one time. The problem with blocking is if SQL Server blocked a session for a long period, this can cause...

Do you know the Risks to your Database?

Using Efficient Lists in PowerShell

By default, PowerShell uses simple “object arrays” when you define lists, when commands return more than one result, or when you otherwise need to store more than one thing in a variable. Default object arrays are OK but they cannot grow once you created them. When...

1 4 5 6 7 8 16