<

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

Getting Started with Server Core - Account and Server Management Commands

Published on
15,529 Points
8,929 Views
6 Endorsements
Last Modified:
Approved
Community Pick
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
Comment
Author:Brian
0 Comments

Featured Post

Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

Join & Write a Comment

This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month