1. Modify Computer Name
Working Group: Netdom Renamecomputer%computername%/newname:08r2servercore
In the domain environment: Netdom renamecomputer%computername%/newname:08r2servercore/userd:administrator/passwordd:p@ssw0rd
2. Set the computer IP address
Set the IP address to dynamic get: Netsh Interface IPv4 set address name= "Local Area Connection" Source=dhcp
Set IP addresses to a static ip:netsh Interface IPv4 set Address "Local Area Connection" Static 10.0.0.10 255.0.0.0 10.0.0.1
3. Set DNS Address
Netsh Interface IPv4 Set dnsserver "Local Area Connection" 202.96.209.133 index=1
4. Close the firewall
Netsh Firewall Set opmode Disable
5. Open Firewall 80 port
Netsh Firewall add portopening TCP blah enable subnet
6. Join a computer to a domain
netdom join%computername%/domain: Domain name/userd: domain name \ privileged Username/passwordd:*
7. Remove the computer from the domain
netdom remove%computername%/domain: domain/userd: domain name \ user name with permissions/passwordd:*
8. Reboot the computer and turn off the computer
Reboot: SHUTDOWN/R/T 0
Shutdown: SHUTDOWN/S/T 0
9. Common View Commands
To view the features that have been installed: oclist
To view computer information: systeminfo
View computer Name: hostname
To view the current computer port usage: Netstat-na
To view the current port usage: Netstat-na | Find "80"
To view the activation information for your computer: Slmgr.vbs-did
10. Activate command
Activate with a serial number: SLMGR/IPK 11111-22222-33333-44444-55555
Automatic activation: Slmgr/ato
11. Users and Groups
New User: NET user Alice P@ssw0rd
Delete User: NET user Alice/del
Modify User password: NET user Alice abc123,
New group: net localgroup salesgroup
Add Alice to the group salesgroup:net localgroup Salesgroup Alice/add
Move Alice out of group Salesgroup: net localgroup salesgroup Alice/del
12. Configure the computer Web proxy address and port
netsh winhttp Set proxy 10.0.0.1:8080
13 Allow or prohibit ping
Allow Ping: netsh firewall set icmpsetting 8
Prohibit ping: netsh firewall Set icmpsetting 8 disable
14. Install and Uninstall roles:
Install dhcp:start/w OCSetup Dhcpservercore
Uninstall dhcp:start/w OCSetup Dhcpservercore/uninstall
Set to start automatically: sc config dhcpserver start = auto
The name of another service can be viewed by: oclist
15. Upgrade to RODC
-----First write a Unattend.txt file, copy the following into a file, and store it in the C disk---
[DCInstall]
Installdns=yes
Confirmgc=no
Criticalreplicationonly=yes
Disablecancelfordnsinstall=no
Replicadomaindnsname=contoso.com
Replicaornewdomain=readonlyreplica
Replicationsourcedc=server8.contoso.com
Safemodeadminpassword=abc123,
Sitename=default-first-site-name
Userdomain=contoso.com
Username=administrator
Password=p@ssw0rd
-------------------------------------
Then enter at the command line:
Dcpromo/unattend: "C:\unattend.txt"