Necessity is the mother of new PowerShell code :-)! Today, I had to unmask all the columns I had helped mask using Dynamic Data Masking. This simple post assumes that you are a privileged user with the ability to drop "Column Masking"! Identify Masked Columns The SQL to identify all masked columns is pretty simple … Continue reading PowerShell & SQL Server: Unmask All Masked Columns (Dynamic Data Masking) In Database
Tag: PowerShell
PowerShell: How To Reverse Alphabetical File Names & Rename
Recently I had shot a bunch of videos on a Video App on my iPhone. By default it saves the videos/photos within the App itself. Later, I can move them to iPhone "Photos". Why are file names in reverse order of how I shot them? In the case of this app, I just did "Select … Continue reading PowerShell: How To Reverse Alphabetical File Names & Rename
SQL Server: Disable/Remove Indexes Across Servers/Databases Using PowerShell & dbatools
This is something I had to do today. In this blog post, I am going to show you how you can disable or remove indexes matching certain name criteria or other condition(s) across multiple servers and databases in various tables. Usually, this is a very painful process if done by hand but with the fantastic … Continue reading SQL Server: Disable/Remove Indexes Across Servers/Databases Using PowerShell & dbatools
PowerShell: Prevent Accidental Runs of Scripts
The problem and it's a big one! You might want to read this to the end! You are into PowerShell and have a ton of scripts. The problem is some of them run things that are not meant to be run at any time by anyone except you when you first set it up 🙂 … Continue reading PowerShell: Prevent Accidental Runs of Scripts
PowerShell/dbatools Tip – Clone a login / database user
One of the more frequent requests that a SQL Server DBA receives is to "Clone a login" with all its permissions. For example a request could be Clone BILL_BLACK's login and create a new login JACK_JOHNSON with exactly the same privileges in all databases. Clone AD group login BILLING_APP_ADMINS and create a login for new … Continue reading PowerShell/dbatools Tip – Clone a login / database user