VMware Workstation 部署企業(yè)級 AD 域、DNS、DHCP 系統(tǒng)操作指南
當(dāng)前位置:點(diǎn)晴教程→知識管理交流
→『 技術(shù)文檔交流 』
一、主機(jī)環(huán)境規(guī)劃 1. 虛擬機(jī)配置表
2. 軟件版本
二、部署步驟 1. 創(chuàng)建虛擬機(jī)
2. 安裝操作系統(tǒng)
powershell New-NetIPAddress -InterfaceAlias "Ethernet0" -IPAddress 192.168.1.10 -PrefixLength 24 -DefaultGateway 192.168.1.1 Set-DnsClientServerAddress -InterfaceAlias "Ethernet0" -ServerAddresses 192.168.1.10
powershell New-NetIPAddress -InterfaceAlias "Ethernet0" -IPAddress 192.168.1.20 -PrefixLength 24 -DefaultGateway 192.168.1.1 Set-DnsClientServerAddress -InterfaceAlias "Ethernet0" -ServerAddresses 192.168.1.10 3. 部署 Active Directory 域服務(wù) (AD DS)
powershell # 安裝 AD 域服務(wù)和 DNS Install-WindowsFeature AD-Domain-Services, DNS -IncludeManagementTools
# 提升為域控制器并創(chuàng)建新林 Install-ADDSForest -DomainName "corp.example.com" -DomainNetbiosName "CORP" -InstallDNS -Force
powershell # 檢查 DNS 正向解析區(qū)域 Get-DnsServerZone -Name "corp.example.com"
# 測試域名解析 nslookup dc01.corp.example.com 192.168.1.10 4. 部署 DHCP 服務(wù)器
powershell Install-WindowsFeature DHCP -IncludeManagementTools
powershell # 添加作用域 Add-DhcpServerV4Scope -Name "MainScope" -StartRange 192.168.1.100 -EndRange 192.168.1.200 -SubnetMask 255.255.255.0
# 配置選項(xiàng) Set-DhcpServerv4OptionValue -DnsServer 192.168.1.10 -Router 192.168.1.1
powershell Add-DhcpServerInDC -DnsName "dhcp01.corp.example.com" -IPAddress 192.168.1.20 5. 客戶端加入域并測試
powershell Add-Computer -DomainName "corp.example.com" -Credential (Get-Credential CORP\Administrator) -Restart
powershell # 查看客戶端 IP 配置 ipconfig /all
# 測試 DNS 解析 ping dc01.corp.example.com 三、日常運(yùn)維操作 1. AD 域管理
powershell # 創(chuàng)建用戶 New-ADUser -Name "John.Doe" -SamAccountName "johndoe" -AccountPassword (ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force) -Enabled $true
# 創(chuàng)建組并添加成員 New-ADGroup -Name "IT_Admins" -GroupScope Global Add-ADGroupMember -Identity "IT_Admins" -Members "johndoe"
cmd gpupdate /force 2. DNS 管理
powershell # 添加 A 記錄 Add-DnsServerResourceRecordA -Name "webserver" -ZoneName "corp.example.com" -IPv4Address 192.168.1.50
# 清理過期記錄 Clear-DnsServerCache -Force
3. DHCP 管理
powershell # 查看地址池使用情況 Get-DhcpServerv4ScopeStatistics -ScopeId 192.168.1.0
# 釋放過期租約 Remove-DhcpServerv4Lease -IPAddress 192.168.1.101
powershell # 導(dǎo)出 DHCP 配置 Export-DhcpServer -File "C:\DHCP_Backup.xml" -Leases
# 恢復(fù)配置 Import-DhcpServer -File "C:\DHCP_Backup.xml" -BackupPath "C:\DHCP_Backup" 4. 數(shù)據(jù)備份與恢復(fù)
powershell # 使用 Windows Server Backup Install-WindowsFeature Windows-Server-Backup wbadmin start systemstatebackup -backupTarget:E:
5. 服務(wù)器監(jiān)控
powershell # 監(jiān)控 CPU/內(nèi)存 Get-Counter -Counter "\Processor(_Total)\% Processor Time", "\Memory\Available MBytes"
# 監(jiān)控 AD 復(fù)制狀態(tài) repadmin /showrepl
四、協(xié)同工作機(jī)制 1. 跨服務(wù)依賴
2. 自動化腳本
powershell # 檢查 AD 復(fù)制狀態(tài) repadmin /replsummary
# 檢查 DNS 服務(wù) Get-Service DNS
# 檢查 DHCP 作用域 Get-DhcpServerv4ScopeStatistics
五、注意事項(xiàng) 1. 安全加固
2. 故障排查
3. 維護(hù)周期
轉(zhuǎn)自https://www.cnblogs.com/Johny-zhao/p/18890099 該文章在 2025/6/3 10:33:39 編輯過 |
關(guān)鍵字查詢
相關(guān)文章
正在查詢... |