Wednesday, March 23, 2011

Quick Reference for Server Core Installations (R2 edition)


Configuration and installation

 

Task Steps
Set the local administrative password At a command prompt, type:
net user administrator *
Join a computer to a domain
  1. At a command prompt, type on one line:

    netdom join %computername% /domain: /userd:\username> /passwordd:*

  2. Restart the computer.
Confirm that the domain has changed At a command prompt, type:
set
Remove a computer from a domain At a command prompt, type:
netdom remove
Add a user to the local Administrators group. At a command prompt, type:
net localgroup Administrators /add \
Remove a user from the local Administrators group At a command prompt, type:
net localgroup Administrators /delete
Add a user to the local computer At a command prompt, type:
net user /add *
Add a group to the local computer At a command prompt, type:
net localgroup /add
Change the name of a domain-joined computer At a command prompt, type:
netdom renamecomputer %computername% /NewName: /userd: /passwordd:*
Confirm the new computer name At a command prompt, type:
set
Change the name of a computer in a work group
  1. At a command prompt, type:

    netdom renamecomputer /NewName:

  2. Restart the computer.
Disable paging file management At a command prompt, type:
wmic computersystem where name="" set AutomaticManagedPagefile=False
Configure the paging file At a command prompt, type:
wmic pagefileset where name=”” set InitialSize=,MaximumSize=
Where:
path/filename is the path to and name of the paging file
initialsize is the starting size of the paging file in bytes.
maxsize is the maximum size of the page file in bytes.
Change to a static IP address.
  1. At a command prompt, type:

    ipconfig /all

  2. Record the relevant information or redirect it to a text file (ipconfig /all >ipconfig.txt).

  3. At a command prompt, type:

    netsh interface ipv4 show interfaces

  4. Verify that there is an interface list.

  5. At a command prompt, type:

    netsh interface ipv4 set address name source=static address= gateway=

  6. Verify by typing ipconfig /all at a command prompt and checking that DHCP enabled is set to No.
Set a static DNS address.
  1. At a command prompt, type:

    netsh interface ipv4 add dnsserver name= address= index=1

  2. At a command prompt, type:

    netsh interface ipv4 add dnsserver name= address= index=2

  3. Repeat as appropriate to add additional servers.

  4. Verify by typing ipconfig /all and checking that all the addresses are correct.
Change to a DHCP-provided IP address from a static IP address.
  1. At a command prompt, type:

    netsh interface ipv4 set address name= source=DHCP

  2. Verify by typing Ipconfig /all and checking that DCHP enabled is set to Yes.
Enter a product key At a command prompt, type:
slmgr.vbs –ipk
Activate the server locally. At a command prompt, type:
slmgr.vbs -ato
Activate the server remotely.
  1. At a command prompt, type:

    cscript slmgr.vbs –ipk

  2. At a command prompt, type:

    cscript slmgr.vbs -ato

  3. Retrieve the GUID of the computer by typing cscript slmgr.vbs -did

  4. Type cscript slmgr.vbs -dli

  5. Verify that License status is set to Licensed (activated).

Networking and firewall

 

Task Steps
Configure your server to use a proxy server. At a command prompt, type:
netsh Winhttp set proxy :
noteNote
Server Core installations cannot access the Internet through a proxy that requires a password to allow connections.
Configure your server to bypass the proxy for internet addresses. At a command prompt, type:
netsh winttp set proxy :bypass-list=""
Display or modify IPSEC configuration. At a command prompt, type:
netsh ipsec
Display or modify NAP configuration. At a command prompt, type:
netsh nap
Display or modify IP to physical address translation. At a command prompt, type:
arp
Display or configure the local routing table. At a command prompt, type:
route
View or configure DNS server settings. At a command prompt, type:
nslookup
Display protocol statistics and current TCP/IP network connections. At a command prompt, type:
netstat
Display protocol statistics and current TCP/IP connections using NetBIOS over TCP/IP (NBT). At a command prompt, type:
nbtstat
Display hops for network connections. At a command prompt, type:
pathping
Trace hops for network connections. At a command prompt, type:
tracert
Display the configuration of the multicast router. At a command prompt, type:
mrinfo
Enable remote administration of the firewall. At a command prompt, type:
netsh advfirewall firewall set rule group=”Windows Firewall Remote Management” new enable=yes

Updates, error reporting, and feedback

 

Task Steps
Install an update. At a command prompt, type:
wusa .msu /quiet
List installed updates At a command prompt, type:
systeminfo
Remove an update.
  1. Type at a command prompt:

    expand /f:* .msu c:\test

  2. Navigate to c:\test\ and open .xml in a text editor.

  3. In .xml, replace Install with Remove and save the file.

  4. At a command prompt, type:

    pkgmgr /n:.xml
Configure automatic updates. At a command prompt:
  • To verify the current setting, type:

    cscript scregedit.wsf /AU /v

  • To enable automatic updates, type:

    cscript scregedit.wsf /AU 4

  • To disable automatic updates, type:

    cscript scregedit.wsf /AU 1
Enable error reporting. At a command prompt:
  • To verify the current setting, type: serverWerOptin /query

  • To automatically send detailed reports, type:

    serverWerOptin /detailed

  • To automatically send summary reports, type:

    serverWerOptin /summary

  • To disable error reporting, type: serverWerOptin /disable
Participate in the Customer Experience Improvement Program (CEIP). At a command prompt:
  • To verify the current setting, type:

    serverCEIPOptin /query

  • To enable CEIP, type:

    serverCEIPOptin /enable

  • To disable CEIP, type:

    serverCEIPOptin /disable

Services, processes, and performance

 

Task Steps
List the running services. At a command prompt, type either of the following:
  • sc query

  • net start
Start a service. At a command prompt, type either of the following:
  • sc start

  • net start
Stop a service. At a command prompt, type either of the following:
  • sc stop

  • net stop
Retrieve a list of running applications and associated processes. At a command prompt, type:
tasklist
Stop a process forcibly.
  1. Use the tasklist command to retrieve the process ID (PID).

  2. At a command prompt, type:

    taskkill /PID
Start Task Manager. At a command prompt, type:
taskmgr
Manage the performance counters and logging with commands such as typeperf, logman, relog, tracerprt. See http://go.microsoft.com/fwlink/?LinkId=84872.

Event logs

 

Task Steps
List event logs. At a command prompt, type:
wevtutil el
Query events in a specified log. At a command prompt, type:
wevtutil qe /f:text
Export an event log. At a command prompt, type:
wevtutil epl
Clear an event log. At a command prompt, type:
wevtutil cl

Disk and file system

 

Task Steps
Manage disk partitions. For a complete list of commands, at a command prompt, type:
diskpart /?
Manage software RAID. For a complete list of commands, at a command prompt, type:
diskraid /?
Manage volume mount points. For a complete list of commands, at a command prompt, type:
mountvol /?
Defragment a volume. For a complete list of commands, at a command prompt, type:
defrag /?
Convert a volume to the NTFS file system. At a command prompt, type:
convert /FS:NTFS
Compact a file. For a complete list of commands, at a command prompt, type:
compact /?
Administer open files. For a complete list of commands, at a command prompt, type:
openfiles /?
Administer VSS folders. For a complete list of commands, at a command prompt, type:
vssadmin /?
Administer the file system. For a complete list of commands, at a command prompt, type:
fsutil /?
Verify a file signature. At a command prompt, type:
sigverif /?
Take ownership of a file or folder. For a complete list of commands, at a command prompt, type:
icacls /?

Hardware

 

Task Steps
Add a driver for a new hardware device.
  1. Copy the driver to a folder at %homedrive%\.

  2. At a command prompt, type:

    pnputil -i -a %homedrive%\\.inf
Remove a driver for a hardware device.
  1. For a list of loaded drivers, at a command prompt, type:

    sc query type= driver

  2. At the command prompt, type:

    sc delete

No comments:

Post a Comment