PowerShell has matured as the automation tool of choice on the Microsoft platform, be it on Windows or Azure. However, there is no official guidance on best-practices and standards around some things. At times, bloggers do things incorrectly in their examples thereby reinforcing bad practices. Hopefully, this small post will help connect some dots for you! Please … Continue reading Thoughts On When To Use – Write-Host, Write-Output, Write-Debug, Write-Warning, Write-Verbose & Write-Error/Throw
First, thank you for reading this post. I have completed a bit over 100 posts on my blog. Granted this is not an accomplishment by any means, it still acts as a reminder for me that it is > "zero posts" in the year 2017. Thanks to Steve Jones (Twitter / Facebook) for getting me started with blogging six years … Continue reading 100 Posts!
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
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
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”