The Multifunctioning DBA:

Windows Administration


September 24, 2009  4:13 PM

Powershell Remove files



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

I have a server that attempts to backup up the SQL Server databases and it always fails because not enough space is available. This usually is not a big deal as I would run a SQL Clean up task before the backups run to remove the old files. In this case though I am using a third party utility to...

August 14, 2009  8:56 PM

Random Password Script Powershell



Posted by: Colin Smith
Database Administration, Passwords, Powershell, Windows Administration

I was recently asked if I could write a script that would create a random password based on a word list. The password needs to have a capital letter, a special character, and a number. The password also has to be made up of two seperate words that are in the word list. my words.csv file is...


July 23, 2009  9:43 PM

More with Quest AD Powershell CMDLETS



Posted by: Colin Smith
Active Directory, Domain Administration, Microsoft Windows, Powershell, Windows, Windows Administration

I am continuing work on the script that I am converting from VBScript to Powershell and I must say that it is going quite well with the help of the Quest cmdlets. In the script I want to go through a particular OU and delete any accounts that are currntly disabled, and were created a minimum of 180...


July 22, 2009  9:59 PM

Get List of all DC’s in your Domain



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

I am working on converting a vbscript that I wrote a couple of years ago into a powershell script. This script requires that I query all of the Domain Controllers in my domain to get the most up to date data that is possible. I used the Quest AD Commanlets and they made it easy. I have discussed...


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...


April 24, 2009  4:15 PM

SQL Ping Servers Improved



Posted by: Colin Smith
Database Administration, DBA, Monitoring, Powershell, SQL Server, Windows Administration

Not long ago I did a post about pinging the interface of a server since you may encounter a problem connecting to WMI even if a server is up. The article is at


April 7, 2009  5:14 PM

Powershell Ping



Posted by: Colin Smith
Database Administration, DBA, Monitoring, Powershell, Windows Administration

I have a script that goes out and pings all of my SQL Servers. This script, right now, simply makes a connection to the SQL Server instance. If I am able to connect I call it good and if not I send out notifications saying that the SQL Server is down. I found that more often than not I was getting...


March 30, 2009  9:57 PM

Scripting



Posted by: Colin Smith
Active Directory, Database Administration, Linux, Powershell, Scripting, System Administration, Unix, Windows, Windows Administration

So I have people ask me all the time how I can get so much done in a day. I have to be honest with you, I do not really do that much. This is because I write scripts to do anything and everything for me if I have to do it more than once I script it. If I think something...


March 26, 2009  5:20 PM

Free Space or Mount Points



Posted by: Colin Smith
Disk Space, Mount Point, Powershell, Windows Administration

I had a question about getting free space of mount points on a windows server. The user had some Exchange servers with a huge chunk of san disk attached. Then he mounted drive letters into empty folders on that disk. This gave him multiple mount points on that one volume. Now he wants to be able to...


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: