wdsutil set-server

配置 Windows 部署服务服务器的设置。

Syntax

wdsutil [Options] /Set-Server [/Server:<Server name>]
    [/Authorize:{Yes | No}]
    [/RogueDetection:{Yes | No}]
    [/AnswerClients:{All | Known | None}]
    [/Responsedelay:<time in seconds>]
    [/AllowN12forNewClients:{Yes | No}]
    [/ArchitectureDiscovery:{Yes | No}]
    [/resetBootProgram:{Yes | No}]
    [/DefaultX86X64Imagetype:{x86 | x64 | Both}]
    [/UseDhcpPorts:{Yes | No}]
    [/DhcpOption60:{Yes | No}]
    [/RpcPort:<Port number>]
    [/PxepromptPolicy
        [/Known:{OptIn | Noprompt | OptOut}]
        [/New:{OptIn | Noprompt | OptOut}]
    [/BootProgram:<Relative path>]
         /Architecture:{x86 | ia64 | x64}
    [/N12BootProgram:<Relative path>]
         /Architecture:{x86 | ia64 | x64}
    [/BootImage:<Relative path>]
         /Architecture:{x86 | ia64 | x64}
    [/PreferredDC:<DC Name>]
    [/PreferredGC:<GC Name>]
    [/PrestageUsingMAC:{Yes | No}]
    [/NewMachineNamingPolicy:<Policy>]
    [/NewMachineOU]
         [/type:{Serverdomain | Userdomain | UserOU | Custom}]
         [/OU:<Domain name of OU>]
    [/DomainSearchOrder:{GCOnly | DCFirst}]
    [/NewMachineDomainJoin:{Yes | No}]
    [/OSCMenuName:<Name>]
    [/WdsClientLogging]
         [/Enabled:{Yes | No}]
         [/LoggingLevel:{None | Errors | Warnings | Info}]
    [/WdsUnattend]
         [/Policy:{Enabled | Disabled}]
         [/CommandlinePrecedence:{Yes | No}]
         [/File:<path>]
             /Architecture:{x86 | ia64 | x64}
    [/AutoaddPolicy]
         [/Policy:{AdminApproval | Disabled}]
         [/PollInterval:{time in seconds}]
         [/MaxRetry:{Retries}]
         [/Message:<Message>]
         [/RetentionPeriod]
             [/Approved:<time in days>]
             [/Others:<time in days>]
    [/AutoaddSettings]
         /Architecture:{x86 | ia64 | x64}
         [/BootProgram:<Relative path>]
         [/ReferralServer:<Server name>
         [/WdsClientUnattend:<Relative path>]
         [/BootImage:<Relative path>]
         [/User:<Owner>]
         [/JoinRights:{JoinOnly | Full}]
         [/JoinDomain:{Yes | No}]
    [/BindPolicy]
         [/Policy:{Include | Exclude}]
         [/add]
              /address:<IP or MAC address>
              /addresstype:{IP | MAC}
         [/remove]
              /address:<IP or MAC address>
              /addresstype:{IP | MAC}
    [/RefreshPeriod:<time in seconds>]
    [/BannedGuidPolicy]
         [/add]
              /Guid:<GUID>
         [/remove]
             /Guid:<GUID>
    [/BcdRefreshPolicy]
         [/Enabled:{Yes | No}]
         [/RefreshPeriod:<time in minutes>]
    [/Transport]
         [/ObtainIpv4From:{Dhcp | Range}]
             [/start:<start IP address>]
             [/End:<End IP address>]
         [/ObtainIpv6From:Range]
             [/start:<start IP address>]
             [/End:<End IP address>]
         [/startPort:<start Port>
             [/EndPort:<start Port>
        [/Profile:{10Mbps | 100Mbps | 1Gbps | Custom}]
        [/MulticastSessionPolicy]
             [/Policy:{None | AutoDisconnect | Multistream}]
                 [/Threshold:<Speed in KBps>]
                 [/StreamCount:{2 | 3}]
                 [/Fallback:{Yes | No}]
        [/forceNative]

Parameters

Parameter Description
[/Server:<服务器名称>] 指定服务器的名称。 可以是 NetBIOS 名称或完全限定域名 (FQDN)。 如果未指定服务器名称,将使用本地服务器。
[/Authorize:{Yes |No}] 指定是否在动态主机控制协议 (DHCP) 中授权此服务器。
[/RogueDetection:{是 |No}] 启用或禁用 DHCP 未授权检测。
[/AnswerClients:{All |已知 |None}] 指定此服务器将应答的客户端。 If you set this value to Known, a computer must be prestaged in active directory Domain Services (AD DS) before it will be answered by the Windows Deployment Services server.
[/Responsedelay:<time in seconds>] 服务器在应答启动客户端之前等待的时间。 此设置不适用于预留的计算机。
[/AllowN12forNewClients:{Yes |No}] 对于 Windows Server 2008,指定未知客户端不必按 F12 键即可开始网络启动。 已知客户端将接收为计算机指定的启动程序,如果未指定,则接收为体系结构指定的启动程序。

对于 Windows Server 2008 R2,此选项已替换为以下命令:wdsutil /Set-Server /PxepromptPolicy /New:Noprompt

[/ArchitectureDiscovery:{Yes |No}] 启用或禁用体系结构发现。 这有助于发现未正确广播其体系结构的基于 x64 的客户端。
[/resetBootProgram:{Yes |No}] 确定是否擦除刚启动而不需要按 F12 键的客户端的启动路径。
[/DefaultX86X64Imagetype: {x86 | x64 |Both}] 控制将向基于 x64 的客户端显示哪些启动映像。
[/UseDhcpPorts:{Yes |No}] 指定 PXE 服务器是否应尝试绑定到 DHCP 端口(TCP 端口 67)。 If DHCP and Windows Deployment Services are running on the same computer, you should set this option to No to enable the DHCP server to utilize the port, and set the /DhcpOption60 parameter to Yes. The default setting for this value is Yes.
[/DhcpOption60:{是 |No}] 指定是否应为 PXE 支持配置 DHCP 选项 60。 If DHCP and Windows Deployment Services are running on the same server, set this option to Yes and set the /UseDhcpPorts option to No. The default setting for this value is No.
[/RpcPort:<端口号>] 指定用于为客户端请求提供服务的 TCP 端口号。
[/PxepromptPolicy] 配置已知(预留)客户端和新客户端开始 PXE 启动的方式。 此选项仅适用于 Windows Server 2008 R2。 可以使用以下选项设置这些设置:

- [/Known:{OptIn|OptOut|Noprompt}] - 为预留客户端设置策略。
- [/New:{OptIn|OptOut|Noprompt}] - 为新客户端设置策略。

OptIn means the client needs to press a key in order to PXE boot, otherwise it will fall back to the next boot device.

Noprompt means the client will always PXE Boot.

OptOut means the client will PXE boot unless the Esc key is pressed.

[/BootProgram:<相对路径>] /Architecture:{x86 | ia64 | x64} Specifies the relative path to the boot program in the remoteInstall folder (for example, boot\x86\pxeboot.n12), and specifies the architecture of the boot program.
[/N12BootProgram:<相对路径>] /Architecture:{x86 | ia64 | x64} Specifies the relative path to the boot program that does not require pressing the F12 key (for example, boot\x86\pxeboot.n12), and specifies the architecture of the boot program.
[/BootImage:<相对路径>] /Architecture:{x86 | ia64 | x64} 指定启动客户端应接收的启动映像的相对路径,并指定启动映像的体系结构。 可以为每个体系结构指定此项。
[/PreferredDC:<DC 名称>] 指定 Windows 部署服务应使用的域控制器的名称。 它可以是 NetBIOS 名称或 FQDN。
[/PreferredGC:<GC 名称>] 指定 Windows 部署服务应使用的全局目录服务器的名称。 它可以是 NetBIOS 名称或 FQDN。
[/PrestageUsingMAC:{是 |No}] 指定在 AD DS 中创建计算机帐户时,Windows 部署服务是否应使用 MAC 地址而不是 GUID/UUID 来标识计算机。
[/NewMachineNamingPolicy:<策略>] 指定为客户端生成计算机名称时要使用的格式。 For information about the format to use for <policy>, right-click the server in the mmc snap-in, click Properties, and view the directory Services tab. For example, /NewMachineNamingPolicy: %61Username%#.
[/NewMachineOU] 用于指定 AD DS 中将创建客户端计算机帐户的位置。 可以使用以下选项指定位置。

- [/type: Serverdomain | Userdomain | UserOU | Custom ] 指定位置的类型。 Serverdomain creates accounts in the same domain as the Windows Deployment Services server. Userdomain creates accounts in the same domain as the user performing the installation. UserOU creates accounts in the organizational unit of the user performing the installation. Custom allows you to specify a custom location (you must also specify a value for /OU with this option).
- [/OU:<Domain name of OU>] - if you specify Custom for the /type option, this option specifies the organizational unit where computer accounts should be created.

[/DomainSearchOrder:{GCOnly |DCFirst}] 指定用于在 AD DS(全局目录或域控制器)中搜索计算机帐户的策略。
[/NewMachineDomainJoin:{Yes |No}] 指定在安装过程中是否应将尚未在 AD DS 中预留的计算机加入域。 The default setting is Yes.
[/WdsClientLogging] 指定服务器的日志记录级别。

- [/Enabled:{Yes | No}] - 启用或禁用 Windows 部署服务客户端操作的日志记录。
- [/LoggingLevel: {None | Errors | Warnings | Info} - 设置日志记录级别。 None is equivalent to disabling logging. Errors is the lowest level of logging and indicates that only errors will be logged. Warnings includes both warnings and errors. Info is the highest level of logging and includes errors, warnings, and informational events.

[/WdsUnattend] 这些设置控制 Windows 部署服务客户端的无人参与安装行为。 可以使用以下选项设置这些设置:

- [/Policy:{Enabled | Disabled}] - 指定是否使用无人参与安装。
- [/CommandlinePrecedence: {Yes | No}] - 指定在客户端安装过程中是使用 Autounattend.xml 文件(如果客户端上存在),还是使用通过 /Unattend 选项直接传递到 Windows 部署服务客户端的无人参与安装程序文件,而不是映像无人参与文件。 The default setting is No.
- [/File:<Relative path> /Architecture:{x86 | ia64 | x64}] - 指定无人参与文件的文件名、路径和体系结构。

[/AutoaddPolicy] 这些设置控制自动添加策略。 可以使用以下选项定义这些设置:

- [/Policy: {AdminApproval | Disabled}] - AdminApprove causes all unknown computers to be added to a pending queue, where the administrator can then review the list of computers and approve or reject each request, as appropriate. Disabled indicates that no additional action is taken when an unknown computer attempts to boots to the server.
- [/PollInterval:{time in seconds}] - 指定网络启动程序轮询 Windows 部署服务服务器的时间间隔(以秒为单位)。
- [/MaxRetry: <Number>] - 指定网络启动程序应轮询 Windows 部署服务服务器的次数。 This value, along with /PollInterval, dictates how long the network boot program will wait for an administrator to approve or reject the computer before timing out. For example, a MaxRetry value of 10 and a PollInterval vlue of 60 would indicate that the client should poll the server 10 times, waiting 60 seconds between tries. 因此,客户端将在 10 分钟(10 x 60 秒 = 10 分钟)后超时。
- [/Message: <Message>] - 指定在网络启动程序对话框页上显示给客户端的消息。
- [/RetentionPeriod] - 指定计算机在被自动清除之前可能处于挂起状态的天数。
- [/Approved: <time in days>] - 指定已批准计算机的保留期。 You must use this parameter with the /RetentionPeriod option.
- [/Others: <time in days>] - 指定未批准计算机(拒绝或挂起)的保留期。 You must use this parameter with the /RetentionPeriod option.

[/AutoaddSettings] 指定要应用于每台计算机的默认设置。 可以使用以下选项定义这些设置:

- /Architecture: {x86 | ia64 | x64} - 指定体系结构。
- [/BootProgram: <Relative path>] - 指定发送到已批准计算机的启动程序。 如果未指定启动程序,则将使用计算机体系结构的默认值(在服务器上指定)。
- [/WdsClientUnattend: <Relative path>] - 设置已批准的客户端应接收的无人参与文件的相对路径。
- [/ReferralServer: <Server name>] - 指定客户端将用于下载映像的 Windows 部署服务服务器。
- [/BootImage: <Relative path>] - 指定已批准的客户端将接收的启动映像。
- [/User: <Domain\User | User@Domain>] - 设置对计算机帐户对象的权限,以授予指定用户将计算机加入域所需的权限。
- [JoinRights: {JoinOnly | Full}] - 指定要分配给用户的权限类型。 JoinOnly requires the administrator to reset the computer account before the user can join the computer to the domain. Full gives full access to the user, including the right to join the computer to the domain.
- [/JoinDomain: {Yes | No}] - 指定在安装 Windows 部署服务期间是否应将计算机作为此计算机帐户加入域。 The default setting is Yes.

[/BindPolicy] 配置 PXE 提供程序要侦听的网络接口。 可以使用以下选项定义该策略:

- [/Policy: {Include | Exclude}] - 设置接口绑定策略以包括或排除接口列表中的地址。
- [/add] - 向列表添加接口。 还必须指定 /addresstype 和 /address。
- [/remove] - 从列表中删除接口。 还必须指定 /addresstype 和 /address。
- /address:<IP or MAC address> - 指定要添加或删除的接口的 IP 或 MAC 地址。
- /addresstype: {IP | MAC} - Indicates the type of address specified in the /address option.

[/RefreshPeriod: <seconds>] 指定服务器刷新其设置的频率(以秒为单位)。
[/BannedGuidPolicy] 可以使用以下选项管理禁止的 GUID 列表:

- [/add] /Guid:<GUID> - 向禁止的 GUID 列表添加指定的 GUID。 具有此 GUID 的任何客户端都将改为由其 MAC 地址标识。
- [/remove] /Guid:<GUID> - 从禁止的 GUID 列表中删除指定的 GUID。

[/BcdRefreshPolicy] 可以使用以下选项配置用于刷新 Bcd 文件的设置:

- [/Enabled:{Yes | No}] - 指定 Bcd 刷新策略。 When /Enabled is set to Yes, Bcd files are refreshed at the specified time interval.
- [/RefreshPeriod:<time in minutes>] - 指定刷新 Bcd 文件的时间间隔。

[/Transport] 可以配置以下选项:

  • [/ObtainIpv4From: {Dhcp | Range}] - 指定 IPv4 地址的源。

    • [/start: <starting Ipv4 address>] - 指定 IP 地址范围的起始。 This option is required and valid only if /ObtainIpv4From is set to Range
    • [/End: <Ending Ipv4 address>] - 指定 IP 地址范围的结束。 This option is required and valid only if /ObtainIpv4From is set to Range.
  • [/ObtainIpv6From:Range] [/start:<start IP address>] [/End:<End IP address>] 指定 IPv6 地址的源。 此选项仅适用于 Windows Server 2008 R2,唯一支持的值是 Range。
  • [/startPort: <starting port>] - 指定端口范围的起始。
  • [/EndPort: <Ending port>] - 指定端口范围的结束。
  • [/Profile: {10Mbps | 100Mbps | 1Gbps | Custom}] - 指定要使用的网络配置文件。 只有运行 Windows Server 2008 的服务器才支持此选项。
  • [/MulticastSessionPolicy] 配置多播传输的传输设置。 此命令仅适用于 Windows Server 2008 R2。

    • [/Policy:{None | AutoDisconnect | Multistream}] - 确定如何处理慢速客户端。 None 表示将所有客户端以相同的速度保持在一个会话中。 AutoDisconnect 表示低于指定 /Threshold 的任何客户端都将断开连接。 Multistream 表示客户端将按照 /StreamCount 指定分为多个会话。
    • [/Threshold:<Speed in KBps>] - 对于 /Policy:AutoDisconnect,此选项以 KBps 为单位设置最小传输速率。 低于此速率的客户端将与多播传输断开连接。
    • [/StreamCount:{2 | 3}] [/Fallback:{Yes | No}] - 对于 /Policy:Multistream,此选项确定会话数。 2 表示两个会话(快和慢)3 表示三个会话(慢、中、快)。
    • [/Fallback:{Yes | No}] - 确定断开连接的客户端是否将使用其他方法(如果客户端支持)继续传输。 如果使用 WDS 客户端,计算机将回退到单播。 Wdsmcast.exe 不支持回退机制。 此选项也适用于不支持“Multistream”的客户端。 在这种情况下,计算机将回退到另一种方法,而不是移动到较慢的传输会话。

Examples

若要将服务器设置为仅应答已知客户端(响应延迟为 4 分钟),请键入:

wdsutil /Set-Server /AnswerClients:Known /Responsedelay:4

若要设置服务器的启动程序和体系结构,请键入:

wdsutil /Set-Server /BootProgram:boot\x86\pxeboot.n12 /Architecture:x86

若要在服务器上启用日志记录,请键入:

wdsutil /Set-Server /WdsClientLogging /Enabled:Yes /LoggingLevel:Warnings

若要在服务器以及体系结构和客户端无人参与文件上启用无人参与,请键入:

wdsutil /Set-Server /WdsUnattend /Policy:Enabled /File:WDSClientUnattend \unattend.xml /Architecture:x86

若要将预启动执行环境 (PXE) 服务器设置为尝试绑定到 TCP 端口 67 和 60,请键入:

wdsutil /Set-server /UseDhcpPorts:No /DhcpOption60:Yes