Skip to content

Posts from the ‘Administration’ Category


SQL Server 2012 Unattended Installation

Automating installations is a good thing. It means that the installations are consistent across multiple installations, there’s (by necessity) documentation for later reference of what and how something was installed, and automatic, unattended installations scale really well. If you’re doing it more than once, you should be automating it.

There are two ways to specify installation parameters for an unattended install of SQL Server 2012:

  1. Manually, specifying each parameter:
  2. Easily, specifying a configuration file that contains all of your configuration parameters:
    Setup.exe /ConfigurationFile="ConfigurationFile.ini"

I much prefer the second method of provided a configuration file as I don’t have to remember all of the required parameters and I know my parameters are correct. Most of the time all I have to do is take a previously used configuration file, tweak a few lines, and I’m good to go.

Creating a Configuration File

You have a few different options for creating a confirmation file: You can create it from a previously existing one you may have or an example one provided by someone else, make your own from scratch (you may want to reference the Microsoft documentation, or opt to have SQL Server 2012 Setup create it for you. There isn’t much too it, as it’s just a plain-text INI file. Read moreRead more


Implementing a Proper Backup Plan

Who has heard this scenario before from a friend, family member, or co-worker?

Them: “Hey, so my computer was making this weird ticking noise and then this morning it said it couldn’t find the hard drive.”

You: “Uh-oh. It sounds like your hard drive is toast.”

Them: “Can you fix it?”

You: “Sure. I’ll pick up a hard drive after work. We’ll have to reisntall everything though. No big deal though, because you have a backup, right?”

Them, after a brief pause: “Um, no. I’ve been meaning to do that.”

Suddenly a not so painful task has turned into a matter of life and death. It’s imperative that you get that iTunes collection and picture of Aunt Agatha from the last family reunion back. Too bad there wasn’t a backup. Read moreRead more


Peeking Inside Windows Image Files (WIMs)

As everyone’s well aware, creating unattended scripts for Windows is really useful, and any time spent upfront making answer file easily pays for itself in the long wrong (even if the only thing it does is fill in the product key for you). When building answer files for operating system such as Windows 7 and Windows Server 2008, you need to write in the name of the image (from the WIM file) you want the installer to use. In some cases this is pretty straight forward, but in other cases an image file can actually have many images in it. For example, Server 2008 R2 has all of these images in its install.wim file: Read moreRead more


Learn Even More About Your Users in Active Directory Users and Computers

Did you know that there’s a very easy way to view all sorts of additional user account information within Active Directory Users and Computers? I’m a little embarrassed that it took me so long to figure this out. For the longest time, as I’m sure many of us other administrators will have to admit to, I have resorted to having custom scripts run that tie into Active Directory in order to view some simple things such as the last time a user logged on, or a user SID.

Well, all of it and more can be found on the Additional Account Info tab of a user account within Active Directory Users and Computers.

Viewing Addictional Account Info in Active Directory Users and Computers

“Wait, I don’t have that tab!” you say? Yeah, neither did I. There’s a step or two you have to take in order to get it, but well worth it.

First, download the Windows Server 2003 Resource Kit Tools if you don’t already have it. You don’t need to install the entire package, but you do need to extract a dll (acctinfo.dll) from it otherwise (In my case, for instance, I’m setting this up on my workstation where I do administration from, and there is no need to install the entire resource kit.). If you choose the extract method, copy acctinfo.dll to your %systemroot%\system32 folder.

Then all you have to do is register the dll:

regsvr32 %systemroot%\system32\acctinfo.dll

There will always be a place for scripts, don’t get me wrong, but in this case when dealing with user accounts, you’re often busy in Active Directory Users and Computers anyways. Only makes sense to consolidate your tools.


Use Netsh to Change TCP/IP Settings from the Command Prompt

Netsh is a tool that allows you to change TCP/IP settings from the command prompt. You can even make changes to remote workstations that you have access to. Once you learn the basics of scripting with netsh, it’s effortless to make changes (especially when compared to using the GUI and endless windows and dialogs). Netsh has been available in all versions of Windows since the Windows 2000 days.

The things you can do with netsh are pretty extensive, and there’s no way that I can sum them all up here in a simple post. What I will attempt to do though is make mention of a few examples of netsh’s usage, and add more examples in the future. For anything more extensive, the accompanying documentation is fairly decent and can be viewed by using the /? switch.

View TCP/IP Settings

netsh interface ip show config

Set IP Address

Set a static IP of, with a subnet of and default gateway of

netsh interface ip set address name="Local Area Connection"

Obtain IP Address via DHCP

netsh interface ip set address "Local Area Connection" dhcp

Set DNS Server Address

netsh interface ip set dns "Local Area Connection" static

Dynamically Obtain DNS Settings

netsh interface ip set dns "Local Area Connection" dhcp

Silently Install CutePDF Writer and Ghostscript

I was quite recently looking to find a way to install CutePDF Writer silently (like most corporate setups) as to keep user interaction to a minimum. Getting CutePDF Writer fully installed consists of intsalling both the writer itself, as well as the GPL Ghostscript. Here’s the fix:


  1. Download the Ghostscript converter.
  2. Rename converter.exe to
  3. Extract the contents of the zip file.
  4. Run converter\Setup.exe.

CutePDF Writer

  1. Download the CutePDF Writer installer.
  2. Run CuteWriter.exe /verysilent. Using the /silent switch also works, but shows the status of the unattended installation.

Pretty simple. I opted to combine the two into a batch file:

cutewriter.exe /verysilent
rd "%ALLUSERSPROFILE%\Start Menu\Programs\CutePDF" /S /Q

SSH on Windows Server 2008

Even in this day in age with hightened security throughout it, Windows Server 2008 still lacks a native SSH server. Luckily though, with open source tools such freeSSHd, we can still get the end result. FreeSSHd even has a built-in SFTP server which makes accessing your remote file securely, surprisingly easy.

Install FreeSSHd

Download and install freeSSHd from The install is pretty straight forward: Run the installer and accept all of the default options. The only exception is to opt to run the SSH server as a service when you are asked.

Add Firewall Rule

A new inbound rule needs to be added to the Windows Firewall in order to allow TCP SSH traffic in on port 22. This can be done either from the Windows Firewall with Advanced Security snap-in or the command line with netsh. The snap-in has a wizard that works great and will walk you through step by step. I prefer the command line with netsh if it’s going to be straight forward with nothing fancy:

netsh advfirewall firewall add rule name="SSH" dir=in action=allow
protocol=TCP localport=22

Configure freeSSHd

To configure the freeSSHd server, run the freeSSHd application (either desktop or Start menu shortcuts) as administrator. Not running with administrator rights will result in your changes not being saved.

A tray icon will appear, which will allow you to open the freeSSHd settings dialog. Essentially, it’s just a GUI that makes changes to the FreeSSHDService.ini file (C:\Program Files\FreeSSHDService).

Create a user account for yourself. I didn’t have much luck getting NT authentication working as the authorization mode. I think it may have something to do with UAC being turned on on Server 2008. Selecting Password stored as SHA1 hash worked great though.

Once you’ve created your user accounts, among changing other settings, close the dialog to save the changes. To put the changes into effect though, you’ll need to restart the freesshdservice:

net stop freesshdservice
net start freesshdservice

That’s it. You should be all set and ready to test your connection with Putty or some other SSH client.