Windows Server R2 under Server Core common commands

Source: Internet
Author: User

1. Modify the computer name

Working Group: Netdom Renamecomputer%computername%/newname:08r2servercore

In the domain environment: Netdom renamecomputer%computername%/newname:08r2servercore/userd:administrator/passwordd:[email protected]

2. Set the computer IP address

Set IP address to dynamic fetch: Netsh Interface IPv4 set address name= "Local connection" source=dhcp

Set the IP address 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 the DNS address

Netsh Interface IPv4 Set dnsserver "Local Area Connection" 202.96.209.133 index=1

4. Turn off the firewall

Netsh Firewall Set opmode Disable

5. Open Firewall 80 port

6. Join a computer to a domain

netdom join%computername%/domain: Domain name/userd: domain name \ privileged User name/passwordd:*

7. Remove the computer from the domain

netdom remove%computername%/domain: Domain name/userd: domain name \ privileged User name/passwordd:*

8. Restart the computer and shut down the computer

Restart: shutdown/r/T 0

Shutdown: SHUTDOWN/S/T 0

9. Common Viewing commands

To view the features you have installed: oclist

View computer Information: systeminfo

View computer Name: hostname

View current computer port usage: Netstat-na

To view the current port usage: Netstat-na | Find "80"

To view your computer's activation information: Slmgr.vbs-did

10. Activation command

Activate with a serial number: SLMGR/IPK 11111-22222-33333-44444-55555

Auto-activation: Slmgr/ato

11. Users and Groups

New User: NET user Alice [email protected]

Delete users: 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 the 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 disable ping

Allow ping in: netsh firewall set icmpsetting 8

Disable ping in: netsh firewall Set icmpsetting 8 disable

14. Install and Uninstall roles:

Installing dhcp:start/w OCSetup Dhcpservercore

Uninstalling dhcp:start/w OCSetup Dhcpservercore/uninstall

Set to auto start: sc config dhcpserver start = auto

The names of other services can be viewed by: oclist

15. Upgrading to an RODC

-----First write a Unattend.txt file, copy the following to the file, stored in the C drive---

[DCInstall]
Installdns=yes
Confirmgc=no
Criticalreplicationonly=yes
Disablecancelfordnsinstall=no
Rebootoncompletion=yes
Replicadomaindnsname=contoso.com
Replicaornewdomain=readonlyreplica
Replicationsourcedc=server8.contoso.com
Safemodeadminpassword=abc123,
Sitename=default-first-site-name
Userdomain=contoso.com
Username=administrator
[Email protected]

-------------------------------------

Then, at the command line, enter:

Dcpromo/unattend: "C:\unattend.txt"


Windows Server R2 under Server Core common commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.