The Multifunctioning DBA:

Powershell


June 30, 2009  3:38 PM

Reboot a Remote Windows Host Remotely



Posted by: Colin Smith
Administration, Powershell, Remote boot, Windows Administration

Say you need to reboot a server and this is something that you would like to automate based on certain criteria. For instance, I might want to reboot a server if I can talk to the server but for somereason my SQL Server is not up and running. If everything is configured correctly the SQL Server...

June 30, 2009  3:28 PM

Test a path in Powershell



Posted by: Colin Smith
Microsoft Windows, Powershell, Windows Administration

this is a simple thing but it can be very useful. I use this is many of my scripts. Sometimes I want to make sure that a file is available for me to append and if not then I would like to create a new one. Take a log file for example, if the file has been moved or deleted, perhaps it grew very...


June 26, 2009  5:46 PM

Finding what account a Service is running as



Posted by: Colin Smith
Database Administration, MSSQL, Powershell, Services

Yesterday my boss came to me asking if I knew what server an account was running on. I know that the account is used as a SQL Server service account because of the naming convention that was used. I also know that the account is being used as I used the Quest Software cmdlet get-qaduser to query AD...


June 26, 2009  3:54 PM

Another Example of why you should learn Powershell



Posted by: Colin Smith
Administration, Powershell, Scripting, Server Administration

I was roaming around the web and reading some articles and I ran across the following blog post: http://bassplayerdoc.blogspot.com/2008/10/another-one-liner-in-windows-powershell.html I think this is a great reason why all administrators that deal with Microsoft products should learn...


June 25, 2009  9:24 PM

PowerShell SQL Server Health Check Script



Posted by: Colin Smith
Excel, Monitoring, MSSQL, Powershell, SQL Server

OK so I think that I have everything I want in my script to check on the health of my SQL Servers. I will run this at least once a day and more if needed. I hope that this will help some people out and if you have any questions, comments, or ideas of what else might be good to include please let me...


June 25, 2009  6:12 PM

Powershell Query AD



Posted by: Colin Smith
Active Directory, Powershell

I have talked in the past about some cmdlets that Quest Software provides for Powershell. Well today they came in usefull for me. My boss came up and wanted to know when the last time a certain service account had authenticated to the domain. Now we log all users logging in via our login script but...


June 25, 2009  3:30 PM

SQL Server Health Report



Posted by: Colin Smith
Microsoft, Monitoring, MSSQL, Powershell, Reporting, SQL Server

Yesterday I posted about a great article that I found on how to use Powershell to create an excel file and also use SMO to get information about SQL Server. I am working on a report that I will have run daily. This report is going to give me an overall health check of my SQL Servers. I am going to...


June 23, 2009  7:54 PM

Powershell and SQL Server



Posted by: Colin Smith
MSSQL, Powershell, Reporting, SQL Server

Today I wanted to use Powershell to create a report about my SQL Servers. I found a great article about how to do this using Excel at this link. http://www.mssqltips.com/tip.asp?tip=1759.  the author does a great job here and has a great sample script that you can start with and then modify as you...


May 29, 2009  9:58 PM

Exchange and Powershell



Posted by: Colin Smith
Exchange, Exchange Management, Exchange Scripting, Powershell, Scripting

I was just asked to take a look at writing a script for our new Exchange environment. Now I do not have a lot of experiance scripting for Exchange but I love a Powershell challenge. The problem was that all of our distribution groups had been set up with one option incorrect. I was asked if I could...


May 29, 2009  2:49 PM

Powershell SQL Load Script



Posted by: Colin Smith
Database Administration, MSSQL, Powershell, Scripting, SQL

In my environment we have some servers, test servers, that are loaded from the Production Servers on a regular basis. Since this is the case I have decided that I would like to attempt to script this. I just started but I am already well on my way to getting this done. I am pretty sure that I will...


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: