Scripting Archive

BCP for Flat File ETL

Brent Ozar is hosting today’s #TSQL2sday about the most recent issue you closed. Working with a consulting firm for a variety of clients, I tend to come across all sorts of issues. The most common one is

Quickly execute a folder of SQL scripts using dbatools and PowerShell

I have often run into a situation where it’s been necessary to execute a bunch of scripts handed to me by developers or others. When there are only a couple of scripts to run, it’s not a

Putting The PowerShell Window Title To Better Use | xkln.net

I’ll admit that I typically use VSCode for most of my scripting, but Milosh Djuric put together some neat PS to make the console window title more useful, including some code to show a progress meter. I

Automating File Processing with Python and SQL Server

Garry Bargsley ( b | t ) asks us this month what does “Automate all the things” mean to you. After all, if we have to do something over and over, it only makes sense to automate

Review: Windows PowerShell 2.0 Best Practices – Introduction

    A while back I received a review copy of Windows PowerShell 2.0 Best Practices by Ed Wilson (blog | twitter) and the Windows PowerShell Teams at Microsoft. Having finally found the time to sit down

Powershell – Comparison Operators

I’m writing this one so I remember these operators. Powershell doesn’t use standard operators such as =, <, , !=, etc. These operators are used in the following manner. Operator Conventional Operator -eq = -ne or !=

Powershell – Quite note on Objects

I’m sure this comes as no surprise to anyone who’s dabbled in Powershell, but just about everything in Powershell has an Object underneath. The results we see on screen come from those objects and it’s only when

Powershell – Piping

One of the most often-used features I’ve seen so far in Powershell has been the concept of piping the results of commands into other commands to ultimately return something formatted, limited, or otherwise morphed into the desired

Powershell – Arrays & Hash Tables

I don’t have too much to say about Arrays at this point, but as I’m partly blogging this for my own education, I’ll put down what I’m learning.  At this point, I’m expecting the arrays to be

Powershell – Variables

I’ve just started to play around with variables in Powershell. I used them a little bit before this, but am in the process of figuring out basic commands around variables. First thing to note is that variables