PowerShell – Case-insensitive String Replacement

The problem: Replace "a" with "b" case-insensitively You have a simple string and you want to replace all "a" with "b" in a case-insensitive manner. First attempt (fail): PS C:\Windows\system32> [string] $someString = 'aAaAaAaA' $SomeString.Replace('a', 'b') #Result bAbAbAbAbA What happened? The [string].Replace() method is case-sensitive Second attempt (looks like it works but not quite): PS … Continue reading PowerShell – Case-insensitive String Replacement

PowerShell – Working With SQL Server Reporting Services (SSRS) – Get/Set Data Sources & Deploy Reports

I am working on a DevOps deployment tool to automate all DB infrastructure related deployments (in PowerShell). It has a SSRS side to it besides other components. i.e., SSRS reports have to be deployed. The functions at a high level In this post, I want to publish a few functions that I created around SSRS. They … Continue reading PowerShell – Working With SQL Server Reporting Services (SSRS) – Get/Set Data Sources & Deploy Reports

SQL Server – Simple Tip On Altering SQL Server Tables With Data – Avoid “Saving changes not permitted”

This is a very simple yet handy tip that most SQL Server users are not aware of. Can't alter tables with data?! If you use SQL Server, you must have seen this dialog when you try to alter a table in SSMS (like adding a new column to an existing table containing data). What does … Continue reading SQL Server – Simple Tip On Altering SQL Server Tables With Data – Avoid “Saving changes not permitted”

Eating An Elephant – How To Work With Huge Datasets In Oracle And SQL Server

Simplifying complex problems is difficult but when done, the rewards are definitely worth it. How I single-handedly managed to migrate 55 Billion rows in 4000+ tables: Last year, I created PowerPump a PowerShell based data copy server which continuously migrated 4000+ Oracle tables to SQL Server. It was no simple task given that I had … Continue reading Eating An Elephant – How To Work With Huge Datasets In Oracle And SQL Server

PowerShell: Read-Host On Steroids – Enhancements To Jeff Hicks Version

A better Read-Host - by Jeff Hicks Read-Host is very useful but it is too simplistic to write "good" code using it. Jeff Hicks (Twitter: @JeffHicks, Blog: jdhitsolutions.com/blog/)  who needs no introductions in the PowerShell world (and whose books I read to learn PowerShell), created a better Read-Host. I love his version. Please checkout the nice … Continue reading PowerShell: Read-Host On Steroids – Enhancements To Jeff Hicks Version