The Multifunctioning DBA:

Powershell


February 18, 2011  3:52 PM

SQL Saturday #47 is Tomorrow



Posted by: Colin Smith
Powershell, SQL Saturday, SQL Saturday #47

Tomorrow is the big day and I am very excited. I am a bit nervous but after giving my presentation to my coworkers I feel much better. I mean I really care what they think because I have to work with them everyday and it is important that they respect me and think some what highly of me. As for the...

January 29, 2011  8:00 AM

Powershell Formatting



Posted by: Colin Smith
Formatting, Powershell, Scripting, Training, Webcast

I did not get to see this during the live presentation but I am looking forward to seeing it especially after hearing some co-workers talk about it. If you have the time check it out. I am sure it is going to be great.


December 30, 2010  10:00 PM

New PS Project



Posted by: Colin Smith
Add new tag, Exchange, Powershell

I have just been informed that I have to come up with a way to create a Dynamic Distribution Group in exchange. I have the criteria but I have no clue what a Dynamic Distribution group in and how it is different then a Distribution Group. So off to the learning I go but I think this will be fun and...


December 7, 2010  9:14 PM

Setting Min and Max Memory settings in SQL with Powershell



Posted by: Colin Smith
DBA, memory, Powershell, SMO, SQL Server

So today I was thinking about some of the things that are currently not set up properly on some of my servers. I got to thinking that a lot of them were never set up properly for Min and Max Server memory. Most of them, that were installed before my time, are set up with the defaults and as you all...


December 3, 2010  9:07 PM

Powershell SMO database size property incorrect



Posted by: Colin Smith
Bug, CU, Powershell, SMO, SP1

Ran into an issue while writing a script to gather database properties via smo and one that I want is database size. I wrote the script and started testing it and my values were all wrong and the same for all databases in the instance. I did a few things trying to figure out what I was doing wrong...


November 24, 2010  6:52 PM

Find Database Files with Powershell



Posted by: Colin Smith
Add new tag, DBA, Powershell, Scripting

I recently had a request to go out and find the logical name and the physical name of mdf and ldf files in sql server. I thought this might be a good place to use powershell and the invoke-sqlcmd cmd-let that is with sqlserver2008 snapin. Here is an example of what I did to find the files for...


November 23, 2010  7:05 PM

Powershell Find Files modified after a date



Posted by: Colin Smith
Filesystem, Managment, Powershell, Scripting

I recently needed to find all files in a specific directory that had been written to after a specific date. I also wanted to include all subfolders in the search. I decided to use Powershell to do this and man was it simple. First you have to define the date that you are looking for and you have to...


October 28, 2010  11:00 PM

SQL Server Monitoring



Posted by: Colin Smith
Database Monitoring, Monitoring, Powershell, Scripting

I am getting back into writing my monitoring application in powershell and I have made some progress over the last few days. I have figured out my issue with getting the backup dates and times inserted into my monitoring database and also not entering the information multiple times if I already...


October 28, 2010  9:58 PM

Powershell change color of text



Posted by: Colin Smith
Formatting, Powershell, Scripting

I am working on a script that accepts some user inputs and then echos that back to the user for validation. For this I wanted to make the text that the user submitted be in RED so that it would stand out and make it more readable. I was looking for a way to use this doing echo and echo is an...


October 22, 2010  10:00 AM

Create Random Password and update AD account



Posted by: Colin Smith
AD, Powershell

Not to long ago I was asked to write a script that would create a random password and change an AD account to use that new password. The requirements were that the password be 3 uppercase letters 2 numbers and 3 lowercase letters. Here is what I did.


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: