Server 2008 Core Commands:
· Set IP Address: <Nic> <Dynamic or Static> <IP> <mask> <gateway>
o Netsh interface ip set address “Local Area Connection” static 192.168.10.10 255.255.255.0 192.168.10.1
· Set DNS <dns server ip>
o Netsh interface ip set dnsserver “Local Area Connection” static 192.168.10.10
· Rename Computer:
o Netdom renamecomputer <computername> /newname:<newcomputername>
· Join domain: please note paswordD should have two “D’s” because you are specifying a Domain password
o Netdom join <computername> /domain:<FQDN> /userD:<domain admin> /passwordD:<domain password> <or “*”>
· Enable Remote Administration
o netsh firewall set service RemoteAdmin ENABLE
· Set Firewall
o Netsh firewall set icmpsetting 8 ENABLE
o Netsh firewall set opmode ENABLE
· Map Network Drive:
o net use [DriveLetter] \\Computername\ShareNameDriveLetter = D: E: F: Whatever you have available. Please omit the brackets when defining the driveletter
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:<domain> /userd:<domain>\username> /password:*
2. Restart the computer.
Confirm that the domain has changed
Set
Remove a computer from a domain
Netdom remove
Add a user to the local Administrators group.
Net localgroup Administrators /add <domain>\<username>
Remove a user from the local Administrators group
Net localgroup Administrators /delete <domain\username>
Add a user to the local computer
Net user <domain\user name> /add *
Add a group to the local computer
Net localgroup <group name> /add
Change the name of a domain-joined computer
Netdom renamecomputer %computername% /NewName:<new computer name> /userd:<domain\username> /password:*
Confirm the new computer name
Change the name of a computer in a work group
1. At a command prompt, type:
Netdom renamecomputer <currentcomputername> /NewName:<newcomputername>
Disable paging file management
Wmic computersystem where name="<computername>" set AutomaticManagedPagefile=False
Configure the paging file
Wmic pagefileset where name=”<path/filename>” set InitialSize=<initialsize>,MaximumSize=<maxsize>
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.
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 <ID from interface list> source=static address=<preferred IP address> gateway=<gateway address>
6. Verify by typing Ipconfig /all at a command prompt and checking that DHCP enabled is set to No.
Set a static DNS address.
Netsh interface ipv4 add dnsserver name=<name of primary DNS server> address=<IP address of the primary DNS server> index=1
2. At a command prompt, type:
Netsh interface ipv4 add dnsserver name=<name of secondary DNS server> address=<IP address of the secondary DNS server> 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.
Netsh interface ipv4 set address name=<IP address of local system> source=DHCP
2. Verify by typing Ipconfig /all and checking that DCHP enabled is set to Yes.
Activate the server locally.
Slmgr.vbs -ato
Activate the server remotely.
Cscript slmgr.vbs -ato <servername> <username> <password>
2. Retrieve the GUID of the computer by typing Cscript slmgr.vbs -did
3. Type Cscript slmgr.vbs -dli <GUID>
4. Verify that License status is set to Licensed (activated).
Configure your server to use a proxy server.
Netsh Winhttp set proxy <servername>:<port number>
Configure your server to bypass the proxy for internet addresses.
Netsh winttp set proxy <servername>:<port number>bypass-list="<local>"
Display or modify IPSEC configuration.
Netsh ipsec
Display or modify NAP configuration.
Netsh nap
Display or modify IP to physical address translation.
Arp
Display or configure the local routing table.
Route
View or configure DNS server settings.
Nslookup
Display protocol statistics and current TCP/IP network connections.
Netstat
Display protocol statistics and current TCP/IP connections using NetBIOS over TCP/IP (NBT).
Nbtstat
Display hops for network connections.
Pathping
Trace hops for network connections.
Tracert
Display the configuration of the multicast router.
Mrinfo
Enable remote administration of the firewall.
Netsh firewall set service remoteadmin enable
Install an update.
Wusa <update>.msu /quiet
Remove an update.
1. Type at a command prompt:
Expand /f:* <update>.msu c:\test
2. Navigate to c:\test\ and open <update>.xml in a text editor.
3. In <update>.xml, replace Install with Remove and save the file.
4. At a command prompt, type:
Pkgmgr /n:<update>.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.
· · 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).
ServerCEIPOptin /query
· · To enable CEIP, type:
ServerCEIPOptin /enable
· · To disable CEIP, type:
ServerCEIPOptin /disable
List the running services.
At a command prompt, type either of the following:
· · Sc query
· · Net start
Start a service.
· · SC start <service name>
· · Net start <service name>
Stop a service.
· · SC stop <service name>
· · Net stop <service name>
Retrieve a list of running applications and associated processes.
Tasklist
Stop a process forcibly.
1. Use the Tasklist command to retrieve the process ID (PID).
Taskkill /PID <process ID>
Start Task Manager.
Taskmgr
Manage the performance counters and logging with commands such as typeperf, logman, relog, tracerprt.
See http://go.microsoft.com/fwlink/?LinkId=84872
List event logs.
Wevtutil el
Query events in a specified log.
Wevtutil qe /f:text <log name>
Export an event log.
Wevtutil epl <log name>
Clear an event log.
Wevtutil cl <log name>
Manage disk partitions.
For a complete list of commands, at a command prompt, type:
Diskpart /?
Manage software RAID.
Diskraid /?
Manage volume mount points.
mountvol /?
Defragment a volume.
Defrag /?
Convert a volume to the NTFS file system.
Convert <volume letter> /FS:NTFS
Compact a file.
Compact /?
Administer open files.
Openfiles /?
Administer VSS folders.
Vssadmin /?
Administer the file system.
Fsutil /?
Verify a file signature.
Sigverif /?
Take ownership of a file or folder.
Icacls /?
Add a driver for a new hardware device.
1. Copy the driver to a folder at %homedrive%\<driver folder>.
pnputil -i -a %homedrive%\<driver folder>\<driver>.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 <service_name>