配置 MDT 部署共享规则Configure MDT deployment share rules

2020/3/6

本文内容

在本主题中,了解如何配置 MDT 规则引擎以访问其他资源(包括外部脚本、数据库和 Web 服务),获取额外信息,而不是将设置直接存储在规则引擎中。In this topic, you will learn how to configure the MDT rules engine to reach out to other resources, including external scripts, databases, and web services, for additional information instead of storing settings directly in the rules engine. MDT 中的规则引擎功能强大:用于操作系统部署的大多数设置都是通过规则引擎检索和分配的。The rules engine in MDT is powerful: most of the settings used for operating system deployments are retrieved and assigned via the rules engine. 规则引擎最简单的形式是 CustomSettings.ini 文本文件。In its simplest form, the rules engine is the CustomSettings.ini text file.

分配设置Assign settings

在使用 MDT 时,你可以采用三种不同方法指定设置:When using MDT, you can assign setting in three distinct ways:

你可以在部署前预先暂存信息。You can pre-stage the information before deployment.

你可以提示用户或技术人员获取信息。You can prompt the user or technician for information.

你可以让 MDT 自动生成设置。You can have MDT generate the settings automatically.

为了演示这三个选项,我们来看看一些示例配置。In order to illustrate these three options, let's look at some sample configurations.

示例配置Sample configurations

在添加更多高级组件(如脚本、数据库和 Web 服务)之前,请考虑以下常用配置;它们显示了规则引擎的强大功能。Before adding the more advanced components like scripts, databases, and web services, consider the commonly used configurations below; they demonstrate the power of the rules engine.

按照 MAC 地址设置计算机名Set computer name by MAC Address

如果你具有小型测试环境,或只是想要将设置指定给数量非常有限的计算机,则可以编辑规则,根据给定的 MAC 地址直接指定设置。If you have a small test environment, or simply want to assign settings to a very limited number of machines, you can edit the rules to assign settings directly for a given MAC Address. 如果你具有多台计算机,最好改为使用数据库。If you have many machines, it makes sense to use the database instead.

[Settings]

Priority=MacAddress, Default

[Default]

OSInstall=YES

[00:15:5D:85:6B:00]

OSDComputerName=PC00075

在前面的示例中,你将 MAC 地址为 00:15:5D:85:6B:00 的计算机的计算机名设置为了 PC00075。In the preceding sample, you set the PC00075 computer name for a machine with a MAC Address of 00:15:5D:85:6B:00.

按照序列号设置计算机名Set computer name by serial number

分配计算机名的另一个方法是通过计算机序列号标识计算机。Another way to assign a computer name is to identify the machine via its serial number.

[Settings]

Priority=SerialNumber, Default

[Default]

OSInstall=YES

[CND0370RJ7]

OSDComputerName=PC00075

在此示例中,你将序列号为 CND0370RJ7 的计算机的计算机名设置为了 PC00075。In this sample, you set the PC00075 computer name for a machine with a serial number of CND0370RJ7.

基于序列号生成计算机名Generate a computer name based on a serial number

你还可以将规则引擎配置为使用序列号等已知属性来快速生成计算机名。You also can configure the rules engine to use a known property, like a serial number, to generate a computer name on the fly.

[Settings]

Priority=Default

[Default]

OSInstall=YES

OSDComputerName=PC-%SerialNumber%

在此示例中,你将规则配置为:将计算机名设置为前缀 (PC-) 后跟序列号。In this sample, you configure the rules to set the computer name to a prefix (PC-) and then the serial number. 如果计算机的序列号为 CND0370RJ7,上述配置会将计算机名设置为 PC-CND0370RJ7。If the serial number of the machine is CND0370RJ7, the preceding configuration sets the computer name to PC-CND0370RJ7.

注意Note

使用序列号分配计算机名时请谨慎。Be careful when using the serial number to assign computer names. 序列号可以包含超过 15 个字符,但 Windows 安装程序将计算机名限制为 15 个字符。A serial number can contain more than 15 characters, but the Windows setup limits a computer name to 15 characters.

基于序列号生成受限的计算机名Generate a limited computer name based on a serial number

若要避免分配长度超过 15 个字符的计算机名,可以通过添加 VBScript 函数,更详细地配置规则,如下所示:To avoid assigning a computer name longer than 15 characters, you can configure the rules in more detail by adding VBScript functions, as follows:

[Settings]

Priority=Default

[Default]

OSInstall=YES

OSDComputerName=PC-#Left("%SerialNumber%",12)#

在前面的示例中,你仍将规则配置为:将计算机名设置为前缀 (PC-) 后跟序列号。In the preceding sample, you still configure the rules to set the computer name to a prefix (PC-) followed by the serial number. 但是,添加 Left VBScript 函数后,会将规则配置为仅将序列号的前 12 个字符用于名称。However, by adding the Left VBScript function, you configure the rule to use only the first 12 serial-number characters for the name.

将笔记本电脑添加到 Active Directory 中的不同组织单位 (OU) 中Add laptops to a different organizational unit (OU) in Active Directory

在规则中,你可以找到内置属性,它们使用 Windows Management Instrumentation (WMI) 查询来确定要部署的是笔记本电脑、台式机还是服务器。In the rules, you find built-in properties that use a Windows Management Instrumentation (WMI) query to determine whether the machine you are deploying is a laptop, desktop, or server. 在此示例中,我们假设你想要将笔记本电脑添加到 Active Directory 中的不同 OU。In this sample, we assume you want to add laptops to different OUs in Active Directory. 请注意,ByLaptopType 不是保留字;相反,它是要读取的部分的名称。Note that ByLaptopType is not a reserved word; rather, it is the name of the section to read.

[Settings]

Priority=ByLaptopType, Default

[Default]

MachineObjectOU=OU=Workstations,OU=Contoso,DC=contoso,DC=com

[ByLaptopType]

Subsection=Laptop-%IsLaptop%

[Laptop-True]

MachineObjectOU=OU=Laptops,OU=Contoso,DC=contoso,DC=com

相关主题Related topics

mdt 计算机名_配置 MDT 部署共享规则相关推荐

  1. 禁止更改计算机名_计算机改名、加域脚本集合

    windows计算机改名.改密码.设置ip.加域脚本集合 今天和大家分享一下,如何将前面的改名加域整合在一起,根据选择执行对应的命令. 新建txt文档,输入一下代码,另存为"自动加域脚本.b ...

  2. python 修改计算机名_静心学数据分析002-python基础

    1.前言 在安装好miniconda后,可以开始<learn python3 the hard way--a very simple introduction to the terrifying ...

  3. 禁止更改计算机名_【复习收藏】计算机操作系统考点归纳

    往期专升本知识点 点击查看: [快来收藏!]专升本英语重点词汇 [建议收藏]专升本语文考点知识集合!(2) [建议收藏]专升本语文考点知识集合!(1) about等常见介词短语集合啦,专升本英语必看! ...

  4. sql server management studio 修改计算机名_计算机毕业设计之SpringBoot+ES搜房网

    一.核心技术 1.ElasticSearch+MySQL+Kafka实现站内搜索引擎 2.ElasticSearch+百度地图实现地图找房功能 3.基础核心框架=SpringBoot 4.数据库的常青 ...

  5. 无法搜出共享打印机的计算机名,Win10搜不到共享打印机怎么回事?Win10搜不到共享打印机的处理方法...

    Win10系统要添加共享打印机需要先搜索这个共享打印机,但搜索过程中常常遇到无法搜索到共享打印机的情况,检查别的电脑共享打印机设备一切正常,那到底是哪里出现问题?弄一上午也没有头绪.因此,小编告诉大家 ...

  6. 计算机名与netbios名

    问题:"网上邻居"中打不开工作组的其它计算机,其它的计算机也不能防问此电脑. 症状:在"网上邻居"中显示的不是计算机的名称,而是IP地址. 知识:网络上传输识别 ...

  7. mac 终端 计算机名,mac 修改机器名

    mac使用技巧三则 1.修改机器名 mac安装完成以后会默认将你的机器设成"rainbird's Macbook Pro"之类的名字.这个本身看着就不爽,如果这台机器是别人先用你再 ...

  8. 修改计算机名后导致oracle的oem(企业管理器)无法使用

    环境:xpsp3+oracle10gR2 问题引发原因:重做gho的系统后,为xp修改了计算机名称,重启OracleDBConsoleorcl服务失败 问题1:重启OracleDBConsoleorc ...

  9. 更改计算机名后导致Oracle数据库打不开

    某次手贱不小心把计算机改名,后发现Oracle数据库(以下称数据库)打不开,症状是(数据库)监听器打开后自动关闭或者打开监听报错. 网上有很多解决方案,但是都不全(起码没解决我的). 因为数据库有使用 ...

  10. MDT2013系列之一 MDT 2013 Update 1安装和部署

    环境介绍: 本博文介绍如何使用MicrosoftDeployment Toolkit 2013 Update 1部署Windows 10客户端,实验内容包括安装.配置MDT以及部署Windows 10 ...

最新文章

  1. nuxt渲染html文件,Nuxt页面级缓存
  2. 会为客户着想的商家才是好商家
  3. java时间错误_更改操作系统时间时睡眠()中的Java错误:任何解决方法?
  4. Leetcode:0002(两数之和)
  5. vscode添加源文件_VSCode自制的IDE编译多个源文件
  6. mysql授予权限和撤销权限的关系_MySQL数据库常用的授予权限和撤销权限的命令讲解...
  7. UML-based workflow |wfmc|面向对象的概念
  8. 线程的3种实现方式并深入源码简单分析实现原理
  9. MySQL 5.7 update误操作后数据恢复详解
  10. kafka 安装步骤
  11. html怎么实现年月日的选择,利用select实现年月日三级联动的日期选择效果【推荐】...
  12. 电商产品精修训练营第3天_ps抠图
  13. 2018年度中国IT行业杰出人物奖出炉
  14. 邓应海:3.24最新黄金走势分析,黄金多空操作建议
  15. 用python做下拉菜单
  16. YTU OJ Problem 3013
  17. CISSP考试指南笔记:1.1安全目标
  18. RP Fiber Power 免费讲座---光纤激光器仿真设计
  19. [电影]小蚁雄兵(Antz)
  20. 香港城大计算机学院xutaowei,2018年3月20日学术报告(徐宏,香港城市大学)

热门文章

  1. 自己动手写操作系统(高清图书+源代码)分享
  2. VirtualBox安装及使用说明和虚拟机安装XP系统图文教程
  3. 【java集合框架源码剖析系列】java源码剖析之TreeSet
  4. (带手机版数据同步)高等院校学院学校类网站源码 政府单位学院学校网站织梦模板
  5. Python开发Http代理服务器 - socketref,呆在autonavi.com - C++博客
  6. vs2010中文旗舰版,vs2013,vs2015企业版激活秘钥
  7. 蚂蚁算法matlab
  8. 游戏编辑器研发第一天,对比思考确定底层技术和从0开发场景编辑器原因
  9. 解决vbox挂载VBoxGuestAdditions失败
  10. [Asp.Net Core]Session的使用