Windows Server 2008 R2 Server Common Command summary _win server

Source: Internet
Author: User

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"

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.