SHARE
Facebook X Pinterest WhatsApp

Command Line Tips, Windows Server 2008 Server Core

Written By
thumbnail Nirmal Sharma
Nirmal Sharma
Jul 20, 2010
ServerWatch content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More



Nirmal Sharma

Microsoft has released Windows Server 2008 in various editions. One of them is Server Core. There is no GUI included in the Server Core. You must perform all the commands by using the command-line tools supplied with the Server Core. Here are few important ones.

Win Tip: If you’re in a Windows environment but prefer a command-line interface to a GUI, the Server Core edition of Windows Server 2008 may be right for you. This cheat sheet of basic commands will help you get started.

To set a static IP Address: Netsh interface ipv4 set address name="" source=static address= mask= gateway=

To join Server Core to a domain: Netdom join /domain: /userd: /password:*

To restart the server: Shutdown /r /t 0

To activate the server: Slmgr.vbs -ato

To activate the server by phone, using a KMS Server, or remotely:
Cscript windowsSystem32slmgr.vbs :-ato

To rename the server: Netdom renamecomputer /NewName:

To see the list of available server roles: OCLIST

To setup a role on the server: OCSETUP

Note: OCLIST and OCSETUP are both case sensitive.

To install a Server Role: Start /w ocsetup ServerRoleName

To uninstall a Server Role: Start /w ossetup ServerRoleName /uninstall

Note: You need to know the only role name. The OCsetup command will do the rest.

thumbnail Nirmal Sharma

Nirmal Sharma is a ServerWatch contributor.

Recommended for you...

What Is a Container? Understanding Containerization
What Is a Print Server? | How It Works and What It Does
Nisar Ahmad
Dec 8, 2023
What Is a Network Policy Server (NPS)? | Essential Guide
Virtual Servers vs. Physical Servers: Comparison and Use Cases
Ray Fernandez
Nov 14, 2023
ServerWatch Logo

ServerWatch is a top resource on servers. Explore the latest news, reviews and guides for server administrators now.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.