The Problem One of the initiatives I've been working toward with my team this year is automating as much of our SQL Server patching as possible. Over time our environment has become increasingly complex, and while Microsoft provides some rich GUI utilities for managing Always On Availability Groups, it becomes difficult to use them efficiently... Continue Reading →
Set Database Target Recovery Time with PowerShell
Background My colleague and I were recently looking for ways to improve our production Availabiity Group nodes. These are beefy machines with a large amount of memory, and things like buffer cache scans can be lengthy. In his research, my teammate came across discussions on best practices for the Target Recovery Time setting of databases.... Continue Reading →
Using PowerShell to Disable or Enable a List of Active Directory Users
I was doing some volunteer work recently when it came to my attention that there was a large number of enabled users in their Active Directory environment. This number was far greater than the amount of active employees. In order to address this, we took a simple approach: Export a list of enabled users. Have... Continue Reading →
Administering Azure from PowerShell Core
Introduction Not long ago Microsoft proclaimed to us that they love Linux. And while many remain skeptical of that assertion (and not without reason), the tech giant is continually pouring more time and resources into the open source world. One of the really exciting products of this (to me at least) is PowerShell Core. Not... Continue Reading →
Quickly Copy AD Group Memberships To A New User
I recently moved into a new role and needed to to be added to a number of AD groups. An often-used method for this is to model a new employee's permissions after someone already in the same role. For one or two groups it is relatively simple to just do this manually, but as you... Continue Reading →
List the Manager Emails for AD Group Members with PowerShell
Below is a quick script I've been working on for a colleague. Its simple purpose is to query an AD group then display each member's username and the email address of their manager. Hopefully this will help others accomplish this common task with ease. (Update 04/11/2018) I modified the script to include the employee's full... Continue Reading →
Getting Started with PowerShell Desired State Configuration (DSC)
As I've mentioned in other posts, Desired State Configuration (DSC) is a powerful technology with a lot of potential. However, due to how new it is and how rapidly it's evolving, it can be difficult to get started and figure out how to accomplish your specific goals. My intention here is not to give an... Continue Reading →
Installing SQL Server Using Desired State Configuration
(Update: I've since discovered that SqlServerDsc has replaced xSQLServer.) One of my growing passions is using PowerShell Desired State Configuration (DSC) to automate all the things. I started out with simple configurations for testing but wanted to dive into more complex\useful situations for my day-to-day DBA life. To be honest, I was intimidated by the... Continue Reading →
My First PowerShell Module – PSOraenv
Update (04/01/2019): We've hit over 100 downloads for PSOraenv! A big thanks to the PowerShell community. Please keep using it and let me know how I can make it better. ******* Most of my experience with Oracle has been on Linux, but recently I began working with it on Windows as well. It came to... Continue Reading →
Windows Server Core Jumpstart
Recently I've been looking into the potential that Windows Server Core holds for our environment. Like most eager new Core users, I imagine, I jumped in with grand visions of spinning up a VM quickly and being off to the races administering it from my desktop. The reality wasn't quite the same, as I ran... Continue Reading →