Installing SQL Server 2012 RC0 on Server Core

Last week, I published a blog on Installing SQL Server Denali CTP3 on Server Core and then SQL Server 2012 RC0 was made available for download so I thought I’d write an updated blog since the issues I ran into with the installation seem to be resolved.

One of the new features in SQL Server 2012 is official support from Microsoft for installation on Server Core. There’s an MSDN article on “Install SQL Server 2012 on Server Core” and another MSDN article on “Install SQL Server 2012 from the Command Prompt“ that has a detailed list of all the different parameters. There’s also some good information about the installation on server core in the release notes.

If you just run setup from the command prompt, you’ll end up with this message, although this is to be expected since there are some required parameters which must be specified at the command line or in a configuration file.

One of the interesting new parameters as referenced in the image above is the /UIMODE=EnableUIOnServerCore option which launches the full blown installation GUI. I was unable to do the install through it so this functionality doesn’t seem to be complete.

Based on the first article, the setup routine should enable and/or install all of the necessary prerequisites and with RC0 it does indeed do that (unlike Denali CTP3).

 Setup.exe /qs /ACTION=Install /FEATURES=SQLEngine /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT="mikefrobbins\sqlSvcAcct" /SQLSVCPASSWORD="password" /AGTSVCACCOUNT="mikefrobbins\sqlAgentAcct" /AGTSVCPASSWORD="password" /AGTSVCSTARTUPTYPE="Automatic" /SQLSYSADMINACCOUNTS="mikefrobbins\administrator" /IACCEPTSQLSERVERLICENSETERMS 

The installation proceeds without any problems in the RC0 version:

The GUI portion of setup will begin, although it is unattended.

When the installation completes, you’ll be back at the command prompt:

Add a firewall exception for SQL Server.  Since there’s no GUI for this on server core, you’ll need to use the netsh command:

 netsh advfirewall firewall add rule name="SQL Server Windows NT - 64 Bit" dir=in action=allow program="C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Binn\sqlservr.exe" enable=yes profile=domain
 

With RC0 TCP/IP is enabled by default so there’s no need to manually enable it:

You should now be able to use SQL Server Management Studio on a remote machine to access this SQL Server. If the connection fails, you can test connectivity from the remote machine by telneting to port 1433 on the sql server.

µ

Posted in Server Core, SQL Server | Leave a comment

Installing SQL Server Denali CTP3 on Server Core

One of the new features in SQL Server Denali CTP3 is support for installation on Server Core. There’s an MSDN article on “Installing SQL Server Denali on Server Core” and another MSDN article on “Install SQL Server Denali from the Command Prompt“ that has a detailed list of all the different parameters.

Based on the first article, the setup routine should enable and/or install all of the necessary prerequisites, but that simply isn’t the case from what I found.

If you just run setup from the command prompt, you’ll end up with this message, although this is to be expected since there are some required parameters which must be specified at the command line or in a configuration file.

If you specify all of the correct parameters, the command will return to the command prompt without error after a few seconds and nothing related to SQL will be installed.

Setup.exe /qs /ACTION=Install /FEATURES=SQLEngine /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT=
"mikefrobbins\sqlSvcAcct" /SQLSVCPASSWORD="password" /AGTSVCACCOUNT="mikefrobbins\sqlAgentAcct"
/AGTSVCPASSWORD="password" /AGTSVCSTARTUPTYPE="Automatic" /SQLSYSADMINACCOUNTS=
"mikefrobbins\administrator" /IACCEPTSQLSERVERLICENSETERMS

Go ahead and start Powershell and import the Server Manager module:

Import-Module ServerManager

Enable the wow64-netfx3 feature:

Add-WindowsFeature WoW64-NetFx3

This will actually enable the following features:

Type exit from within PowerShell to get back to a normal command prompt and then run setup again with all of the necessary parameters. The installation should begin:

The GUI portion of setup will begin, although it is unattended.

When the installation completes, you’ll be back at the command prompt:

Add a firewall exception for SQL Server:

Since there’s no GUI for this on server core, you’ll need to use the netsh command:

 netsh advfirewall firewall add rule name="SQL Server Windows NT - 64 Bit" dir=in action=allow program="C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Binn\sqlservr.exe" enable=yes profile=domain
 

Enable TCP/IP in SQL Server Configuration Manager:

There’s no way that I’m aware of to run SQL Server Configuration Manager on server core or to run it remotely so you’ll have to manually edit the registry to enable TCP/IP. Run regedit, navigate to HKLM>Software\Microsoft>Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQLServer\SuperSocketNetLib\Tcp and set the value of enabled to 1:

Restart the SQL Server service:

You should now be able to use SQL Server Management Studio on a remote machine to access this SQL Server. If the connection fails, you can test connectivity from the remote machine by telneting to port 1433 on the sql server.

µ

Posted in PowerShell, Server Core, SQL Server | Leave a comment

Check the Time on Remote Machines with PowerShell

I ran into an issue lately where the domain controller that hosts the PDC emulator FSMO role for the forest root domain became unavailable and the time for several machines in the domain was far enough off to start causing kerberos related security problems.

Here’s a simply Powershell script to query the time on remote machines via WMI. You could use Invoke-Command with Get-Date, but that takes too long compared to just using WMI. I chose to hard code the names I wanted to query directly into the script to eliminate having to keep up with a separate text file or trying to query Active Directory for the names since that may not be possible if the time is way off. This script is my solution to the “I have a problem and I want to eliminate the time on remote machines as a source of it”. I want the time and I want it now!

$servers = 'server1', 'server2', 'server3', 'server4', 'server5', 'server6'

ForEach ($server in $servers) {
    $time = ([WMI]'').ConvertToDateTime((gwmi win32_operatingsystem -computername $server).LocalDateTime)
    $server + '  ' + $time
}

µ

Posted in PowerShell | Leave a comment

Unable to Print Incoming Faxes on FaxPress

I recently received a call from a customer who has an older Castelle FaxPress 5000. They reported that their incoming faxes were no longer printing automatically even though they were receiving faxes in the “Unaddressed Faxes” queue in Faxmain.

To check the settings for automatically printing incoming faxes, open Faxmain, expand the tree, right click on the “Unaddressed Faxes” folder and select properties:

Verify the “Print Incoming Fax” checkbox is checked on the “Incoming Faxes” tab:

Verify the settings on the “Printer Configuration” tab and then click the “Setup” button:

Select the ellipsis (…) and browse for the print server. Much of the necessary information will be filled in automatically and eliminate the potential for error.

Host Name = Netbios name of the print server.
Printer Sharable Name = Share name of the printer.
HOST IP Address = IP Address of the print server.
Login Name = A username in the domain that has access to the shared printer.
Login Password = The password of the username specified in the above setting. This password MUST have a LAN Manager Hash.

The problem that my customer experienced was that the specified account had it’s password changed or the account was changed to a new one that didn’t have a LAN Manager Hash. This caused the specified account to become locked out after a certain number of times of attempting to print. Reversing the setting in my “Removing the LAN Manager Hash security risk” blog long enough to generate a new password with a LAN Manager Hash for this one account resolved the problem.

µ

Posted in Castelle FaxPress | Leave a comment

ASUS Eee PC 1101HAB Netbook RAM & Hard Drive Upgrade

Read this entire blog before beginning this process since there is an issue with SSD hard drives and Windows 7 in this particular netbook model. I will also warn you that this is one of the most difficult machines to replace the hard drive in that I’ve seen.

First, remove the battery and hold down the power button for 30 seconds.

Memory Upgrade
Turn the computer upside down. Remove the single screw from the memory cover:

Remove the memory cover:

The memory cover has clips on both sides and an L shaped plastic bracket at the end opposite to the screw. Lift the cover out at an angle as shown in the above image.

The memory comes out just like any other machine.

I recommend using a precision set of screwdrivers so the computer doesn’t look like it was taken apart with a jack hammer.  I use a Swiss Tools Screwdriver Set.

Hard Drive Upgrade
Remove the 8 screws from the bottom of the computer:

Remove the keyboard by pressing the 4 tabs at the top of the keyboard with a small flat head screwdriver. There are actually no screws that hold the keyboard in place.

Here’s a close up of one of the tabs:

The keyboard lifts out from the top. Be care, there’s still a cable connected underneath it.

Rotate the keyboard so you can disconnect the cable from its ZIF socket. Press both sides of the ZIF socket toward the cable.

Remove the 8 screws from underneath the keyboard including the one underneath the warranty seal. Yes, you will be voiding your warranty by removing this seal. The warranty on my netbook has already expired. Disconnect the touchpad from its ZIF socket. This ZIF socket flips up. Do not press this socket towards the cable or you risk damaging it.

I recommend removing the SD card and start working the top off from the back right side near the RJ-45 jack. Work your way around the entire machine clockwise down the right side, across the front, up the left side, and finally across the back. Pulling forward slightly helps the back come loose easier. Remove the entire top cover portion of the machine. Do not force anything. The clips are not very difficult to work loose, but a small screwdriver may be needed. They can be worked loose without marring the plastic case.

Remove the left side of the cable that’s over the hard drive from its ZIF socket. This ZIF socket also flips up. Remove the single screw that holds the hard drive caddy in place:

Lift the left side of the hard drive up slightly and pull it out to the left. You can completely remove the cable that’s on top of the hard drive by disconnecting the other side of it, but that’s really unnecessary and is just something else to have to reconnect.

Remove the four screws, two on each side and then remove the hard drive from the caddy:

Reassemble all of the hardware in reverse order using the new replacement hard drive. Be sure to connect all the ZIF cables properly. You don’t won’t to have to do all of this again.

Now that you have all of the hardware back together, power on the computer and enter Setup by pressing F2. Verify the computer sees the new amount of memory.

Verify it also sees the new hard drive:

The easiest way to load Windows 7 on a netbook is to create a USB installation drive with a Windows 7 ISO image. See my blog on “The Easy Way to Create a Bootable Windows 7 USB Flash Drive“.

I decided to install Windows 7 Home Premium on my netbook considering the cost was cheaper than pro or ultimate and I wouldn’t use any of the additional features of those editions. The ISO I used included SP1. When you reach this point during the installation:

If the hard drive is not already formatted, the installation will hang or lockup on the first step when it is attempting to “Copy Windows files”.

There are two options to work around this problem. You can boot a copy of Vista or Windows 2008 (non-R2) x86 and format the drive. Then cancel out of the installation. Boot the Windows 7 SP1 installation media and then the install completes without issue. This is the first method I used. I then decided to disassemble the computer again, connect the hard drive to another Windows 7 machine and format it since Windows 7 uses a newer version of the NTFS file system that may have some optimizations for SSD hard drives. This also gave me a chance to document the process and write this blog about it.

µ

Posted in Hardware, Windows 7 | Leave a comment

Initial Configuration of a Dell PowerConnect Switch

You have a new out of the box Dell PowerConnect Switch and need to assign it an IP address so you can remotely access and manage it. Connect a 9 pin serial (female to female) cable to the switch. You’ll probably need a USB to Serial Port adapter on the computer end since most computers (especially laptops) no longer have serial ports.

Open up Hyper Terminal or another terminal emulation program. Configure the connection for: Bits Per Second = 9600, Data Bits = 8, Parity = None, Stop Bits = 1, and Flow Control = None. Press enter and you should end up at a console> prompt.

The following commands configure the switch with a username of admin, password of password, IP address of 192.168.0.10, subnet mask of 255.255.255.0, and a default gateway of 192.168.0.1:

en
config
username admin password password level 15
int vlan 1
ip address 192.168.0.10 255.255.255.0
exit
ip default-gateway 192.168.0.1
exit
copy run start

To verify the configuration, enter:

en
show ip int vlan 1

Once it’s connected to your network, you should be able to remotely access the switch through a web browser using the IP address that it’s been assigned.

µ

Posted in Hardware | Leave a comment

Terminal Server Related PowerShell Scripts

Thought I would post a couple of PowerShell scripts that I’ve recently written. Both of these scripts were written specifically for terminal servers but they can be modified as needed. The first one finds what terminal servers a user is logged into. It retrieves a list of terminal server names from the specified OU. I started out by using the Get-TSServers cmdlet for the list of servers, but that cmdlet takes a while and you have more control by just using the Get-ADComputer cmdlet since your terminal servers are more than likely in their own OU anyway. You need to use a For-Each loop since you can’t specify multiple computer names with the Get-TSSession cmdlet. Looking at the help for that cmdlet shows that all three parameter sets start with: Get-TSSession [-ComputerName <String>]. If it showed: Get-TSSession [-ComputerName <String[]>] instead, multiple computer names would be able to be entered and there would be no need for the For-Each loop.

#Prerequisites:
#Download and install the “Terminal Services PowerShell Module” (by Shay Levy)
#For Windows 7, Download and install the “Remote Server Administration Tools
#Enable the “Active Directory Module for Windows PowerShell” feature

Import-Module ActiveDirectory
Import-Module PSTerminalServices
$user = Read-Host "Enter a user name"
$servers = Get-ADComputer -Filter * -SearchBase "ou=terminal servers,ou=computers,ou=test,dc=mikefrobbins,dc=com" | Select-Object -ExpandProperty Name
ForEach ($server in $servers) {
Get-TSSession -ComputerName $server -Username $user
}

This second one finds who is running a specific process on the terminal servers such as “msaccess.exe” (Microsoft Access). It could actually be used for any machine that supports PowerShell since it doesn’t contain any cmdlets that are specific to terminal server. This example also demonstrates how to change the column header names.

#Prerequisites:
#For Windows 7, Download and install the “Remote Server Administration Tools
#Enable the “Active Directory Module for Windows PowerShell” feature

Import-Module ActiveDirectory
$process = Read-Host "Enter a process name"
$servers = Get-ADComputer -Filter * -SearchBase "ou=terminal servers,ou=computers,ou=test,dc=mikefrobbins,dc=com" | Select-Object -ExpandProperty Name
get-wmiobject win32_process -computer $servers | where {$_.name -eq $process} | select  @{l='Server';e={$_.__server}}, @{l='User';e={$_.getowner().user}}, @{l='Process';e={$_.name}} | sort Server, User

Here’s an updated version of the second script based on Jeffery Hicks comments:

Import-Module ActiveDirectory
$process = Read-Host "Enter a process name"
$servers = Get-ADComputer -Filter * -SearchBase "ou=terminal servers,ou=computers,ou=test,dc=mikefrobbins,dc=com" | Select-Object -ExpandProperty Name
get-wmiobject win32_process -filter "name='$process'" -computer $servers | select  @{l='Server';e={$_.__server}}, @{l='User';e={$_.getowner().user}}, @{l='Process';e={$_.name}} | sort Server, User

µ

Posted in PowerShell, Terminal Server | 2 Comments