How to use findstr like a grep

Since you’re here, you’ve probably looking for solution similar to grep in Linux. findstr is a command-line utility in Windows that allows you to search for specific text strings within one or more files. When running findstr, we will specify the following arguments: Here is some example. We will serach for a word andrzej insiteContinue reading “How to use findstr like a grep”

Restore Database on SQL Server with PowerShell

Today is the day of testing database restoration. Such a test should be done every six months to ensure that the backup and restore work as expected. Sometimes I see that the backup is done outside the maintenance window, manually without the CopyOnly CHECKSUM parameter, and saved to another path, etc. Then it turns outContinue reading “Restore Database on SQL Server with PowerShell”

Join database to SQL Server Availability Group with PowerShell

The customer for whom I am working, need that I check all SQL Server Instances (about 40) for a database that is not joined in the availability group (AG). I am a little bit lazy to do that manually, so I decide to write a PowerShell. Of course, I am using dbatools (thanks to allContinue reading “Join database to SQL Server Availability Group with PowerShell”