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 often called on to do things outside of our direct job descriptions and this is something I have to...
View ArticleGet 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 an object. Here I’ll show you how to cut down the list to a more manageable size so you can find...
View ArticleChange DB Compatibility Level in Powershell
Here I show you 2 easy ways to change the DB compatibility level in powershell. Otherwise you have to use a T-SQL cursor and that’s not only much harder, it’s just no fun. Trust me… use powershell for...
View ArticleBuild .Net Objects in Powershell
I just love the topic of this video. Here we show you how to create .NET code with powershell. While we create an .aspx page, you can build any type of .Net object dynamically. Use this process freely...
View ArticleGet Table Stats with Powershell
Let’s get stats for every table in the DB and put them in a file so we can send them to a customer or view them ourselves. It’s also easy enough to put in a table to query.
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 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 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 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 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 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 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 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 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 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 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 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 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 Article