Windows Server - Windows 部署服务

前提准备条件

域控服务器

# 操作系统
(Get-WmiObject -Class Win32_OperatingSystem).Caption
Microsoft Windows Server 2019 Standard
# IP地址
IP 地址: 10.10.10.10
子网掩码: 255.255.255.0
默认网关: 10.10.10.1
首选DNS服务器: 10.10.10.10
# 系统名称,域
Get-WMIObject Win32_ComputerSystem | Select-Object Name, Domain
Name Domain
---- ------
BJDC01 contoso.com

参考:

​Windows Server - 活动目录域服务​

DHCP服务器

使用和域控同一台服务器,也可以使用一台专属(DHCP)的服务器

# DHCP作用域:BJ-Server
# 起始IP地址:10.10.10.200
# 结束IP地址:10.10.10.250
# 子网掩码:255.255.255.0

Windows Server - Windows 部署服务

DHCP作用域选项

选项

作用

003

网关

10.10.10.1

006

DNS解析

10.10.10.10

066

TFTP启动服务器(Windows 部署服务器)

10.10.10.30

Windows Server - Windows 部署服务

参考:

​Windows Server - DHCP服务器​

安装,配置Windows 部署服务

安装Windows 部署服务

# 操作系统
(Get-WmiObject -Class Win32_OperatingSystem).Caption
Microsoft Windows Server 2019 Standard
# IP地址
IP 地址: 10.10.10.30
子网掩码: 255.255.255.0
默认网关: 10.10.10.1
首选DNS服务器: 10.10.10.10
# 系统名称,域
Get-WMIObject Win32_ComputerSystem | Select-Object Name, Domain
Name Domain
---- ------
BJWDS01 contoso.com
# 以域管理员contoso\administrator登陆
whoami
contoso\administrator
  1. 开始菜单,点击“服务器管理器”
  2. 点击“下一步”
  3. 保持默认的安装类型:“基于角色或基于功能的安装”,点击“下一步”WHO
  4. 保持默认的服务器选择:“从服务器池中选择服务器”,点击“下一步”
  5. 选择“Windows 部署服务”,弹出窗口,点击“添加功能”,点击“下一步”

    Windows Server - Windows 部署服务

  6. 保持默认的功能,点击“下一步”
  7. 点击“下一步”
  8. 保持默认的角色服务,点击“下一步”

    Windows Server - Windows 部署服务

  9. 点击“安装”
  10. 安装完成后,点击“关闭”

初始化配置Windows 部署服务

  1. 开始菜单,点击“Windows 管理工具”
  2. 点击“Windows 部署服务”
  3. 选中服务器BJWDS01.contoso.com,右键选择“配置服务器”

    Windows Server - Windows 部署服务

  4. 点击“下一步”
  5. 保持默认的“与Active Directory集成”,点击“下一步”

    Windows Server - Windows 部署服务

  6. 远程安装文件夹路径修改为D:\RemoteInstall,点击“下一步”

    Windows Server - Windows 部署服务

  7. PXE 服务器初始设置,选择“响应所有客户端计算机(已知和未知)”,点击“下一步”

    Windows Server - Windows 部署服务

  8. 取消“立即向服务器中添加映像”选中状态,点击“完成”

    Windows Server - Windows 部署服务

添加启动映像

挂载Windows 10操作系统的iso镜像,进入sources文件夹,可以看到启动映像和安装映像

  • boot.wim 启动映像
  • install.wim 安装映像

Windows Server - Windows 部署服务

  1. 点击“启动映像”,右键菜单选择“添加启动映像”

    Windows Server - Windows 部署服务

  2. 指定镜像位置(G:\sources\boot.wim),点击“下一步”

    Windows Server - Windows 部署服务

  3. 保持默认的“映像名称”和“映像说明”,点击“下一步”
  4. 点击“下一步”
  5. 点击“完成”

添加安装映像

  1. 点击“安装映像”,右键菜单选择“添加安装映像”

    Windows Server - Windows 部署服务

  2. 保持默认的“映像组”名称,点击“下一步”
  3. 指定镜像位置(G:\sources\install.wim),点击“下一步”

    Windows Server - Windows 部署服务

  4. 仅选中一个版本(例如:Windows 10 专业版),点击“下一步”

    Windows Server - Windows 部署服务

  5. 点击“下一步”
  6. 点击“完成”

网络启动安装操作系统

新建一台同网段的虚拟机或者使用一台同网段的物理机,开机,然后选择网络启动,安装操作系统

Windows Server - Windows 部署服务

按回车键,网络启动

Windows Server - Windows 部署服务

Windows Server - Windows 部署服务

Windows Server - Windows 部署服务

Windows Server - Windows 部署服务

Windows Server - Windows 部署服务

Windows Server - Windows 部署服务

Windows Server - Windows 部署服务

网络启动安装操作系统优化

上述步骤实现了通过网络方式安装操作系统,如果需要进一步优化部署方式,可以使用MDT。

Microsoft Deployment Toolkit (MDT) 为自动化桌面和服务器部署提供统一的工具、流程和指南集合。

参考:

​Windows Server - MDT服务器​