Category Archives: Powershell

Get-AzDataFactoryPipeline: a misleading error

A few weeks back, I wanted to start an Azure Data Factory pipeline using PowerShell. It was the first time I tried that, and I thought it would be pretty simple: get the correct pipeline using Get-AzDataFactoryPipeline, supply all the … Continue reading

Posted in Azure Data Factory, Powershell | Leave a comment

Insert object in Word document with Powershell

At times, you have to create reports in Word format. If these are reports you have to create on a regular basis, you’ll want to automate this as much as possible. There is a lot you can do to automate … Continue reading

Posted in Code samples, Powershell | Leave a comment

Does the Powershell command Restart-Service -force restart dependent services?

This could be my shortest post ever, with a simple “yes”, but let me elaborate. At times, you have to restart a service. With Powershell, this is easy enough (provided you have the right permissions): Restart-Service -name will do the … Continue reading

Posted in Powershell, Uncategorized | Leave a comment

How to create a list of installed SQL Server instances on a cluster

On a normal server, there are several Powershell ways to get a list of all installed SQL instances. Probably the most straightforward way is to query the registry:

You can subsequently use the output to query all instances on … Continue reading

Posted in Powershell | Leave a comment

Powershell disk inventory

Every now and then, I have to tackle a performance problem on a SQL Server I’ve never seen before. One of the things I’ll be looking for is the block size of the disks. The block size for drives containing … Continue reading

Posted in Performance, Powershell | Leave a comment