joeware - never stop exploring... :)

Information about joeware mixed with wild and crazy opinions...

Basic Initial Server Core Tasks

by @ 7:31 pm on 5/12/2007. Filed under tech

Along with the requests for how is Server Core less resource intensive, there were requests for more info on how to do various things in Server Core that you tend to do right off when setting it up to test. I will admit I am by far not the expert here, lots of other folks have spent a lot more time working on this stuff so I highly recommend using google to go look, but right off, book mark this blog if you haven’t already:

Server Core – http://blogs.technet.com/server_core/default.aspx

 

So let’s assume you don’t use an unattend file to build your server core, you pop in the CD, you enter your license key and select Server Core, what next? All sorts of things, here are some of the things I do, note I don’t guarantee any of this, it isn’t official documentation, it is just stuff that I have worked through or found and work for me.

 

1. The first thing I do is install VMWare Tools. You will click on VM | Install VMWare Tools. Normally you will see a MSI file take off and start the installation process. You likely won’t see that on Server Core, at least I have yet to have seen that in I don’t know how many installs I have done. So what do you do?

Switch to D: Drive (or whatever drive if your CD/DVD is another drive)

Type “VMWare Tools.msi”

Walk through the prompts and reboot when it asks

2. Next, I recommend increasing screen res if you are going to do much from the VMWare Client. If you plan on doing everything through RDP, go ahead and skip this. I never did this until some recent testing forced me to.

The first step is to find where the heck the key is that you need to modify. Since part of the key will have a randomly generated GUID, this isn’t the most straightforward, but hopefully the method I give here will be easy. It involves searching in the right branch for a specific registry key that only exists (to my knowledge) in the subbranch that you want to work on for this action.

reg query hklm\system\currentcontrolset\control\video /s | findstr /i volatile

That will result in one or more strings like

HKEY_LOCAL_MACHINE\system\currentcontrolset\control\video\{F6E7436E-54D0-482E-87CD-DAB680AF6216}\0000\VolatileSettings

You need all of the reg path info prior to the \VolatileSettings. You can then run the following command to change your screen res to 1152×864 (what I tend to run in, if you want something else, change the hex values but be careful, you could dork it up and not get to see your screen on your monitor – remotely modify machine in that case).

reg add HKLM\system\currentcontrolset\control\video\{F6E7436E-54D0-482E-87CD-DAB680AF6216}\0000 /v DefaultSettings.XResolution /d 480 /f

reg add HKLM\system\currentcontrolset\control\video\{F6E7436E-54D0-482E-87CD-DAB680AF6216}\0000 /v DefaultSettings.YResolution /d 360 /f

While you are there, you might as well turn on the video hardware acceleration although I haven’t seen it doing much if anything yet… But just in case…

reg add HKLM\system\currentcontrolset\control\video\{F6E7436E-54D0-482E-87CD-DAB680AF6216}\0000 /v Acceleration.Level /d 0 /f

Obviously, starting with Beta 3, you can also use regedit to do this work.

 

3. I recommend changing the window drag format from full window to outline. This is easier… You do need quotes around the registry key though because some bright boy put a space in the name…

reg add “HKCU\Control Panel\Desktop /v DragFullWindows /d 0 /f

4. For my private lab environments I turn off the screen savers, they annoy me

reg add “HKCU\Control Panel\Desktop /v ScreenSaveActive /d 0 /f

If you prefer you can just change how long it takes for the screen saver to start. This is in seconds (decimal), here I am setting it to 1 hour. Again, not something I recommend for production.

reg add “HKCU\Control Panel\Desktop /v ScreenSaveTimeOut /d 3600 /f

5. Set up CSCRIPT to be your default WSH Script engine. Not sure why it isn’t the default on Server Core…

CSCRIPT //H:CSCRIPT

6. Set up your Server Core so you can RDP into it (including from back level RDP clients)… Assumes you followed Step 5

SCRegEdit.wsf /AR 0 /CS 0

netsh firewall set portopening tcp 3389

If you are a firewall lover and have been playing with netsh in Longhorn you know there is an advfirewall interface available and there are specific rules for RDP called “Remote Desktop (TCP-In)”. You can, if you want, go into advfirewall and enable that rule but you will type far more than using the basic firewall command above and the system is smart enough to know that the above command is enabling the public version of “Remote Desktop (TCP-In)”.

 

7. Rename server (not joined to domain)

netdom renamecomputer %computername% /newname:[insert new name here]

8. Restart computer ASAP

shutdown /g /t 1

9. Log off

logoff

10. Set time/date/timezone

timedate.cpl

11. Pull up task manager

CTRL-SHIFT-ESC

or

taskmgr

12. Check activation status… Assumes you followed Step 5

slmgr -xpr

13. To activate. You don’t have to do this right away, you have a month to play…

slmgr -ato

14. To get a list of some other things you can do

SCRegedit.wsf /cli

 

I could give more but this should be enough to get people moving forward and learning how to do things.

 

  joe

Rating 3.00 out of 5

2 Responses to “Basic Initial Server Core Tasks”

  1. Tim Matthews says:

    Hi Joe,

    First – thanks for the blogs and your contribs to ActiveDir mailing list. You are always worth reading!

    A pretty minor question but what exactly are “registered applications” that are restarted with a shutdown /g?

    It feels like I’ve been waiting for years for Core – I do large scale infrastructure and this will help to solve so many problems.

    cheers,
    Tim

  2. joe says:

    Hi Tim,

    Registered apps is something new with Vista/LH, you can call RegisterApplicationRestart which will cause your app to be restarted after a reboot or crash or update.

[joeware – never stop exploring… :) is proudly powered by WordPress.]