Powershell
Microsoft SQL Server – Powershell Splatting
Help keep your command code organized by splatting parameters.
Powershell Classes: Part 5 – Inheritance con’t
Here we finish up the discussion on inheritance and we
Powershell Classes: Part 3
This is part 3 of our series on how to create classes in powershell.We start by going over homework...
Classes in Powershell: Part 2
Here I’m continuing my live class in writing classes in powershell. We go over adding some useful properties and...
Powershell Error Handling Basics 2
Continuing with our discussion on PS error handling. Watch the first vid here: Powershell Error Handling Basics – MidnightDBA
Powershell Error Handling Basics
This is a live session where I teach someone the basics of PS error handling. Here’s the 1st vid...
Beginning Powershell for DBAs: Part 1
The time has come where DBAs can no longer afford to ignore Powershell. Not only has it become an...
Script PK/FKs in Powershell
Here I show you how to script out objects that belong to tables like primary keys, forgeign keys, constraints,...
Object Properties in Powershell
This is a great video that shows you how to look at the properties collection in objects and explains...
Get SQL Server Root Dir in Powershell
Here we’re finding the root install directory for SQL Server.
Truncate Tables in Powershell
Here I show you how to truncate a mass of tables in the same schema. Of course, you don’t...
Drop Tables in Powershell
Today I’m dropping tables based off of a regex expression and by rowcount. Good stuff here. The power of...
Server Configuration Settings in Powershell
I love making vids on the trickier stuff and this one is it. Here we’re talking about duplicating sp_configure...
Change Startup Params in Powershell
I heard someone today say that you can’t change startup parameters in Powershell. So I made this vid to...
Cycle Error Log on all Servers using Powershell
Here I show you how to use the Carrier Method for using powershell to cycle all your error logs....
Read 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...
Change SQL Server Permissions in Powershell: Part 2
Continuing from the 1st video, here I show you how to capture useful errors from the method call. I...
Change Schema in Powershell
Changing object schemas is easy enough in T-SQL when it’s a single object, but it get considerably more complicated...
Get IP and DNS in Powershell
Getting IP address and DNS info from your servers in a useful format isn’t as straightforward as you would...
Calling Detach Methods in Powershell
Detaching DBs in Powershell is pretty easy, which is why you should learn how to do it. It takes...
Attach DBs in Powershell
This continues the series on detach/attach for DBs. Along the way I show you how to deal with a...
Replace sp_MSForEachDB with Powershell
A user request came in to write something in powershell that would replace sp_MSForEachDB. I took it a step...
Sum DB Sizes with Powershell
Quite often it can be useful to not only get a list of DB sizes, but also sum it...
Audit Service Accounts with Powershell
How would you like to be able to audit your service accounts with powershell so you can tell how...
Monitor Backups with Powershell
I know you guys are just begging for an easy way to monitor your backups and alert when one...
Start 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...
Manage DB Files in Powershell
I’m excited to be able to film this one because it has the potential to save you so much...
Get Table Stats with Powershell
Let’s get stats for every table in the DB and put them in a file so we can send...
Build .Net Objects in Powershell
I just love the topic of this video. Here we show you how to create .NET code with powershell....
Change DB Compatibility Level in Powershell
Here I show you 2 easy ways to change the DB compatibility level in powershell. Otherwise you have to...
Get a Specific Method in Powershell
Sometimes the list of properties and methods is too big to sift through when you do a get-member on...
Add User to Windows Group with Powershell
I love this video because it’s so unusual to find something like it in the DBA community. We’re quite...
Replace Text in File
Here I show you how to replace a given string in a file and either write it back to...
Index Scripting Problems
This is just a fun vid. Again, we’re sitting here late at night feeling a little punchy so we’re...
Beginning Powershell for DBAs 4
Here I continue with the 4th class in the series at the NTSSUG user group.
Find DB Files with Powershell
Here I need to find the .MDF for a database so I can attach it, but I have no...
Pass Params to Scripts (Powershell)
Wanna know how to pass parameters to scripts, and when to use each method?
Building a Powershell BCP Routine
Here I show you how to build a script that will BCP an entire group of tables and even...
Beginning Powershell for DBAs 1
This is an excellent video that explains what schemas are and why you should care.
PowerShell Basics
Here I start the first in an exciting new series of vids on PowerShell both in Windows and SQL....
Scripting DB Objects in PowerShell
Continuing with PowerShell I thought I’d show you something really cool you can do that would make a difference...
Scripting DB Objects in Powershell (Advanced Topics)
Here I get past the basics of using the Script() method and take you to how to recreate some...
Working with PSDrive in PowerShell
Here I go over what PSDrive is and how to work with it. I also go into aliases again...
Powershell with –NoExit
Here I show you how to get around the problem of your Powershell window closing down when you call...
Grant DB Permissions
This is a beautiful bit of script that allows you to set DB permissions for a user. This is...
Grant Schema Permissions in Powershell
This is another excellent video that shows the power of powershell in SQL administration. I love this video because...
Powershell Profiles
Here I finally address how to connect to SQL Server from powershell proper by adding the SQL Server snapins....
Beginning Powershell for DBAs 2
This is the 2nd video in the schema series. Here I give you a really good reason to adopt...
Change SQL Server Job Owner
This is a really cool method for changing SQL job owners or any job property I would imagine. It...
Beginning Programming with Powershell
Have you ever wanted to learn how to code, but you don’t think you have enough knowledge to jump...