Microsoft SQL Server – Powershell Splatting
Help keep your command code organized by splatting parameters. Here I show how to splat a colored help file to make it really easy to change colors if you want. JOIN OUR NEWSLETTER!...
View ArticlePowershell Classes: Part 3
This is part 3 of our series on how to create classes in powershell.We start by going over homework and then get into hidden classes and creating a fire hazard in our code. Watch Part 1Watch Part 2
View ArticleClasses in Powershell: Part 1
Ever want to create your own classes in powershell? Ever wonder what a class is? Here I’m teaching a live session that explains what classes are, and the basics of creating classes.This is the 1st...
View ArticlePowershell Error Handling Basics 2
Continuing with our discussion on PS error handling. Watch the first vid here: Powershell Error Handling Basics – MidnightDBA
View ArticlePowershell Error Handling Basics
This is a live session where I teach someone the basics of PS error handling. Here’s the 2nd vid in the series. Powershell Error Handling Basics 2
View ArticleBeginning SQL Server SMO
Recently I was invited to talk about beginning SMO on the SQL Undercover podcast. So I put together a tutorial to teach SMO in PowerShell from the very beginning. This isn’t a PowerShell tutorial; it’s...
View ArticleLoading SQL Data From Powershell
Learn how to load data into and out of SQL Server using PowerShell. We go beyond the basics and use .NET and
View ArticleMonitor Backups with Powershell
I know you guys are just begging for an easy way to monitor your backups and alert when one hasn’t been backed up recently. Here’s a great way to do it in powershell, and it’s easy as pie.
View ArticleBeginning Powershell for DBAs: Part 1
The time has come where DBAs can no longer afford to ignore Powershell. Not only has it become an integral part of SQL Server, but we’re being asked to do things on a much grander scale than ever...
View ArticleRegex: Removing Restore Statement Dupes
This is a great video to show you how to think in a way that gets you a good regex. Here I’ve got SQL restore statements that need to be kept while others need to be deleted. I’m going to show you how...
View ArticleStart Agent Jobs in Powershell
Starting SQL Agent jobs in powershell is easy, but there’s a trick to it that’s not obvious. Here I’ll show you how to start jobs both locally and remotely.
View ArticleManage DB Files in Powershell
I’m excited to be able to film this one because it has the potential to save you so much time and effort. I’m showing you how to manage your DB files with powershell so you can change autogrowth, or...
View ArticleReplication: Initialize with Backup
Sometimes your DB is so big you need to initialize replication with a backup and restore instead of a snapshot. Here I show you how to do it. I don’t go into any replication basics, but I do give a...
View ArticleObject Properties in Powershell
This is a great video that shows you how to look at the properties collection in objects and explains what the different properties mean. So you can see whether a property is writeable and tell when...
View ArticleScript PK/FKs in Powershell
Here I show you how to script out objects that belong to tables like primary keys, forgeign keys, constraints, and indexes with powershell. It’s really a lot easier than you think and it allows you to...
View ArticleServer Properties
Have you ever wanted to be able to view instance-level stats or change certain values without having to use the GUI? Here I’ll show you how to do all your boxes with Powershell.
View ArticleRead SQL Server Error Logs in Powershell
Would you like to work with the SQL Server error logs in Powershell? Well here I’m gonna show you how. Not only do we pull in the current log, but I also show you how to get all of the historical logs...
View ArticleSum DB Sizes with Powershell
Quite often it can be useful to not only get a list of DB sizes, but also sum it up in the last line. This can be useful for estimating backup file sizes, server sizing and more. Here I’ll show you a...
View ArticleAudit Service Accounts with Powershell
How would you like to be able to audit your service accounts with powershell so you can tell how many boxes are running on the same account? Well now you can, and it’s very easy. Come let me show you...
View Article