Community Pick: Many members of our community have endorsed this article.

Getting Started with Server Core - Account and Server Management Commands

BrianIT Manager
CERTIFIED EXPERT
Published:
Updated:
The purpose of this article is not to give you every last detail to Server Core but to provide you with what you need to know it get it up and running in your environment in particular to Domain and Server Management Commands.  

Before you can start managing certain settings below, you will need to make sure that networking is configured on your Server Core installation.  For the basics on how to configure those be sure to read the following article - Getting Started with Server Core - Networking Commands

The most common question I get and something every Server Core Admin should know is how to get the command prompt back once you accidently type exit.  You will need to open Task Manager (Ctrl-Shift-Esc) and click on File - New Task.  Now just type CMD in there and a new Command Prompt window will open up for you.

Join a domain:
netdom join ComputerName /domain:DomainName /userd:UserName /passwordd:*
    * Replace UserName with a valid UserName    
    * Yes, /passwordd:* needs to have that second d at the end of it.
   
Remove from domain:
netdom remove

Rename a Domain Member:
netdom renamecomputer %computername% /NewName: /userd:UserName /passwordd:*
    * Replace NewName with the new name of the domain member
    * Replace UserName with a valid UserName    
    * Yes, /passwordd:* needs to have that second d at the end of it.

Rename a Stand-Alone Member:
netdom renamecomputer /NewName:
     * Replace NewName with the new name of the server

Rename Administrator:
wmic UserAccount where Name="Administrator" call Rename Name="new-name"
    * Please don't call your new admin new-name...so make sure to replace that with a valid name :)  

Add a Local User Account:
net user UserName * /add
    * Replace UserName with a valid name
    * You will be prompted to put in the password twice...it does not display it to the screen.

Delete a Local User Account:
net user UserName /delete
    * Replace UserName with a valid name

Add User to a Local Group:
net localgroup GroupName UserName /add
    * Replace GroupName with a valid local group name
    * Replace UserName with a valid UserName.  If it is a domain user use the following syntax - DomainName\UserName

Remove User from a Local Group:
net localgroup GroupName UserName /delete
    * Replace GroupName with a valid local group name
    * Replace UserName with a valid UserName.  If it is a domain user use the following syntax - DomainName\UserName

Confirm Domain and New Computer name:
Set

Update User Passwords:
Net user [/domain] *


The next set of commands will help you configure the server to help with managing the server.

Toggle Remote Desktop on and off:
Cscript \windows\system32\scregedit.wsf /ar 0

Enable reduced security for RDP connections:
Cscript \windows\system32\scregedit.wsf /cs 0

Active Server Core:
Local method - Slmgr.vbs -- ato
Remote method - Cscript windows\system32\slmgr.vbsServerName UserName password:-ato

List of installed patches:
wmic qfe list

Install Updates:
wusa .msu /quiet

Configure for AutoUpdates:
cscript scregedit.wsf /AU /4

Disable AutoUpdates:
cscript scregedit.wsf /AU /1

View AutoUpdate Setting:
cscript scregedit.wsf /AU /v

Configure the Page File:
wmic pagefileset where name= set InitialSize=,MaximumSize=

Configure a Proxy Server: (Server Core cannot use a proxy that requires a proxy)
netsh Winhttp set proxy :

All your favorite TCP/IP commands work including the following:
IPConfig
ARP
Ping
PathPing
TraceRT
Route
NSLookup
NetStat
NBTStat

List Running Services:
sc query

Start and/or Stop a Service:
sc start
sc stop

Task Manager: (Ctrl+Shift+Esc)
taskmgr

Manage Disk Volumes:
Diskpart /?

Defrag a Volume:
defrag /?

Change Time and Time Zone:
control timedate.cpl

Change the Desktop Resolution: (requires you to log off and back on)
Regedit - HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Video
\0000\DefaultSettings.XResolution
\0000\DefaultSettings.YResolution

Display the Time in the Command Prompt:
prompt [$t]$s$p$g

Log off Server Core:
logoff

Restart Server Core:
shutdown /r /t 0
    * the /t 0 is the time that we are allocated to restart in seconds

Shutdown Server Core:
shutdown /s /t 0
    * the /t 0 is the time that we are allocated to restart in seconds

Feel free to add your own Networking related commands.  

Thanks,
Brian
6
9,269 Views
BrianIT Manager
CERTIFIED EXPERT

Comments (0)

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.