Freigeben über


Renaming and Terminal Services in Server Core

I thought for today’s post I would cover some of the top questions I get on how to do something on Server Core. In coming weeks I’ll expand this into some of my favorite command line tools.

 

First up is how to rename the box, since there isn’t a remoteable gui to let you do this. This is straightforward if you are domain joined:

Netdom renamecomputer %computername% /NewName:new-name /UserD:domain-username /PasswordD:*

But netdom doesn’t currently provide a way to rename a non-domain joined computer. It is a bit of a hassle to join and unjoin from a domain just to rename the computer. WMI is the solution to this one. Using WMIC you can rename the computer using:

wmic computersystem where name="%computername%" rename name="new-name"

The one limitation to this is that it must be run while logged on with the default administrator account.

 

Terminal Services is another common topic. A lot of people think that since there is no shell you can’t TS into Server Core. However, Server Core does include TS remote admin mode, when connected you just have the same experience as if you were logged on locally, a cmd.exe window. TS remote admin mode is not enabled by default and it is another one of those things that is only available in a non-remoteable gui. For this one, we included a script that can be used to turn it on and off, turning it on is done by running:

Cscript \windows\system32\scregedit.wsf /ar 0

Terminal Services by default in Longhorn Server uses a new higher security mode that only allows Vista and Longhorn Server clients to connect. If you want to TS to your Server Core box from a pre-Vista\Longhorn Server Terminal Services client, you need to turn off the higher security mode, which can be done by running:

Cscript \windows\system32\scregedit.wsf /cs 0

Once enabled you can then use the TS MMC snap-ins to remotely manage TS on the Server Core box, or use the TS command line tools. For example, since there is no Start menu to select logoff to end your TS session, you can use the logoff.exe command line tool.

 

If you are ever trying to find a command line tool to do something, check out the “Command-line reference A-Z” at: https://go.microsoft.com/fwlink/?LinkId=20331. This is from Windows XP/Windows Server 2003 help so doesn’t have any of the new Longhorn tools or switches, but it is a useful place to start.

 

Andrew

Comments

  • Anonymous
    January 01, 2003
    PingBack from http://www.network-admin.net/?p=378

  • Anonymous
    January 01, 2003
    The comment has been removed

  • Anonymous
    January 01, 2003
    My friend, netdom works like a charm renaming non-domain joined computers. cheers. Alejandro

  • Anonymous
    June 17, 2006
    The comment has been removed

  • Anonymous
    June 20, 2006
    Thanks for the feedback. This is along the lines of what is planned for RTM. We are looking into more tools for RTM, but listing available roles and optional features is a higher priority.

    If you have suggestions for better switch names, we can change those.

  • Anonymous
    June 21, 2006
    The comment has been removed

  • Anonymous
    June 21, 2006
    The comment has been removed

  • Anonymous
    June 22, 2006
    The comment has been removed

  • Anonymous
    June 22, 2006
    The comment has been removed

  • Anonymous
    June 23, 2006
    Ah, thanks for your comments. It certainly looks like an exciting time for Microsoft, its partners and customers in the Longhorn/Vista timeframe. I am certainly excited.

    I was talking about Core here at work and some of the more pessimistic admins actually got excited at the thought of less to patch, which certainly is a good point. One could easily see Core becoming the preferred server deployment for other roles besides the four core roles, if it became possible.

    Cheers, Nick.

  • Anonymous
    June 23, 2006
    You’re welcome, glad to hear that you and your colleagues are excited.

    We are looking into adding a couple of roles for Beta 3, but nothing is finalized yet.