前言
SCCM
、Intune
和Windows AutoPilot
使Windows系统在企业级的部署变得容易。但相比这些方案,Microsoft Deployment Toolkit
(MDT) 从成本、体积上仍然是一个可行、实用的替代方案。
微软在2010年发布了MDT
并一直对其更新,使其兼容新版本操作系统的部署,并且完全免费。结合Windows Deployment Services
(WDS)使用,实现网络批量系统部署。除此之外,MDT还支持通过自定义任务Powershell
、Bat
等脚本来处理特殊配置、重复的工作,以实现企业特殊需求。
官方介绍
MDT 是自动执行桌面和服务器部署的工具、流程和指南的统一集合。 你可以使用它创建引用映像,或将其用作完整的部署解决方案。 MDT 现在是 IT 专业人员可用的最重要的工具之一。
除了减少部署时间和标准化桌面和服务器映像以外,MDT 还可以使你更轻松地管理安全配置和正在进行的配置。 MDT 基于 Windows Assessment and Deployment Kit
(Windows ADK) 中的核心部署工具构建,其附加指南和功能旨在降低在企业环境中部署的复杂性和所需时间。
MDT 支持部署 Windows 10、Windows 7、Windows 8 和 Windows Server。 它还支持零接触安装 (ZTI) 与Microsoft Endpoint Configuration Manager。
本文为 微风 原创文章.经实践,测试,整理发布.如需转载请联系作者获得授权,并注明转载地址.
环境介绍
以下文章将使用下列版本来搭建MDT:
- MDT:
8456
- Windows ADK for Windows 10:
version2004
- Windows PE add-on for the ADK:
v2004
- Windows AD环境请参考:
安装 Active Directory域服务
官方文档
安装
- 创建域账户:
ITPro\MDT_BA
作为MDT服务器ITPro-MDT01
的服务账户,将其加为本地管理员组并登录; - 安装
Windows10 ADK v2004
; - 安装
WinPE Addon for Windows10 ADK v2004
; - 安装
MDT v8456
配置服务账户
安装 Win10 ADK 2004
选择以下4个组件:
- Deployment Tools
- Imaging and Configuration Designer (ICD)
- Configuration Designer
- User State Migration Tool (USMT)
安装WinPE Addon for Win10 ADK 2004
选择以下组件:
- Windows Preinstallation Environment (Windows PE)
安装MDT 8456
一直下一步直到完成。截止到这里MDT
的安装就完成了,下面会对MDT平台做基础的配置,以便于后期的系统部署.
基础配置
新建共享部署
a. 新建部署共享文件夹:D:\ITPro_MDT
b. 共享名:MDTBuildLab$
c. 部署共享描述:ITPro MDT Lab
配置共享权限
这里可以参考下面的脚本去进行配置。需要替换脚本里的文件夹路径
、AD账户
和共享路径
在MDT服务器上以管理员身份执行该脚本:
# Check for elevation
Write-Host "Checking for elevation"
If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(`
[Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Warning "需要以管理员身份执行此脚本."
Write-Warning "Aborting script..."
Break
}
# Configure NTFS Permissions for the MDT Build Lab deployment share
$DeploymentShareNTFS = "D:\ITPro_MDT"
icacls $DeploymentShareNTFS /grant '"ITPro\MDT_BA":(OI)(CI)(RX)'
icacls $DeploymentShareNTFS /grant '"Administrators":(OI)(CI)(F)'
icacls $DeploymentShareNTFS /grant '"SYSTEM":(OI)(CI)(F)'
icacls "$DeploymentShareNTFS\Captures" /grant '"ITPRO\MDT_BA":(OI)(CI)(M)'
# Configure Sharing Permissions for the MDT Build Lab deployment share
$DeploymentShare = "MDTBuildLab# Check for elevation
Write-Host "Checking for elevation"
If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(`
[Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Warning "需要以管理员身份执行此脚本."
Write-Warning "Aborting script..."
Break
}
# Configure NTFS Permissions for the MDT Build Lab deployment share
$DeploymentShareNTFS = "D:\ITPro_MDT"
icacls $DeploymentShareNTFS /grant '"ITPro\MDT_BA":(OI)(CI)(RX)'
icacls $DeploymentShareNTFS /grant '"Administrators":(OI)(CI)(F)'
icacls $DeploymentShareNTFS /grant '"SYSTEM":(OI)(CI)(F)'
icacls "$DeploymentShareNTFS\Captures" /grant '"ITPRO\MDT_BA":(OI)(CI)(M)'
# Configure Sharing Permissions for the MDT Build Lab deployment share
$DeploymentShare = "MDTBuildLab$"
Grant-SmbShareAccess -Name $DeploymentShare -AccountName "EVERYONE" -AccessRight Change -Force
Revoke-SmbShareAccess -Name $DeploymentShare -AccountName "CREATOR OWNER" -Force
quot;
Grant-SmbShareAccess -Name $DeploymentShare -AccountName "EVERYONE" -AccessRight Change -Force
Revoke-SmbShareAccess -Name $DeploymentShare -AccountName "CREATOR OWNER" -Force
创建日志文件夹并配置共享权限(可选项)
为便于收集、查阅客户端部署日志,这里创建一个集中存储的共享日志文件夹并配置相关权限,在MDT服务器上以管理员身份执行
:
New-Item -Path D:\ITPro_MDT\Logs -ItemType directory
New-SmbShare -Name Logs$ -Path D:\ITPro_MDT\Logs -ChangeAccess EVERYONE
icacls D:\ITPro_MDT\Logs /grant '"MDT_BA":(OI)(CI)(M)'
结语
完成上述配置,如果没有任何报错说明MDT平台已经顺利完成安装. Enjoy :)