database-tools

Using Catalog Files

Catalog file support (.cat) is new in PowerShell 5.1. Cat files basically are file lists with hash values. You can use them to ensure that a given...

Making Error Records More Readable

Whenever PowerShell encounters an error, it emits an Error Record with detailed information about the problem. Unfortunately, these objects are a...

Creating Write-Protected Functions

PowerShell functions by default can be overridden anytime, and you can also remove them using Remove-Item: function Test-Lifespan {...

$FormatEnumerationLimit Scoping Issues

As shown in the previous tip, the secret $FormatEnumerationLimit variable determines how many array elements are shown in output before the output...

Displaying Array Members in Output

When you output objects that have arrays in their properties, only 4 array elements are displayed, then an ellipsis truncates the rest: PS C:\>...

Find All Files Two Levels Deep

Yet another file system task: list all *.log files in a folder structure, but only to a maximum depth of 2 folder structures: Get-ChildItem -Path...

Invoke-WebRequest vs. Invoke-RestMethod

Invoke-WebRequest simply downloads the content from any web site. It is then your job to read the content and make sense of it. In the previous tip...

Downloading PowerShell Code

In the previous tip we explained how Invoke-WebRequest can be used to download the raw HTML content for any web page. This can also be used to...

Hiding Progress Bars

Sometimes, cmdlets automatically display a progress bar. Here is an example of such a progress bar: $url =...

Analyzing Web Page Content

PowerShell comes with a built-in web client which can retrieve HTML content for you. For a simple web page analysis, use the -UseBasicParsing...

Seven steps to alert effectively

Automated alerts are essential to performance monitoring. Automated alerts enable spotting issues in infrastructures, identifying their causes, and...

Adding Extra Safety Net

If you are writing PowerShell functions, and you know a particular function has the potential to cause a lot of harm, there is an easy way of adding...

1 48 49 50 51 52 159