Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Common Server Core commands under windows Server 2008 R2

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

1. Modify computer name

Working group: Netdom RenameComputer% ComputerName% / NewName:08R2ServerCore

Domain environment: Netdom RenameComputer% ComputerName% / Newname:08R2ServerCore / UserD:Administrator / PasswordD:P@ssw0rd

two。 Set the computer IP address

Set the IP address to dynamic learning: Netsh Interface ipv4 Set Address Name= "local connection" Source=DHCP

Set the IP address to a static IP: Netsh Interface ipv4 Set Address "local connection" Static 10.0.0.10 255.0.0.0 10.0.0.1

3. Set DNS address

Netsh Interface ipv4 Set DNSServer "Local connection" 202.96.209.133 index=1

4. Turn off the firewall

Netsh Firewall Set Opmode disable

5. Open firewall port 80

6. Join a computer to a domain

Netdom join% computername% / domain: domain name / userd: domain name\ authorized user name / passwordd:*

7. Remove the computer from the domain

Netdom remove% computername% / domain: domain name / userd: domain name\ authorized user name / passwordd:*

8. Restart and shut down the computer

Restart: shutdown / r / t 0

Shutdown: shutdown / s / t 0

9. Common view commands

View installed features: oclist

View computer information: systeminfo

View computer name: hostname

View current computer port usage: Netstat-na

View the current port usage: Netstat-na | find "80"

View the activation information of the 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

Change the user's password: net user Alice abc123

New group: net localgroup SalesGroup

Add Alice to the group SalesGroup: net localgroup SalesGroup Alice / add

Remove Alice from group SalesGroup: net localgroup SalesGroup Alice / del

twelve。 Configure the computer Web proxy address and port

Netsh winhttp Set proxy 10.0.0.1:8080

13 allow or disable ping

Allow ping to enter: netsh firewall set icmpsetting 8

Prohibit ping from entering: 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 names of other services can be viewed at: oclist

15. Upgrade to RODC

-first write a unattend.txt file, copy the following to the file, and store it on disk C--

[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

Password=P@ssw0rd

-

Then enter on the command line:

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report