简体   繁体   English

我可以使用Powershell Server 2008 R2创建dhcp保留吗

[英]Can I create dhcp reservation with powershell server 2008 r2

Can I create a dhcp reservation with powershell in windows server 2008 r2? 我可以在Windows Server 2008 R2中使用Powershell创建dhcp保留吗?

I can see that they have beautiful cmdlets that are apparently only used on 2012. 我可以看到它们具有漂亮的cmdlet ,这些cmdlet显然仅在2012年使用。

Does this mean I would have to do it using netsh , via 这是否意味着我必须使用netsh通过

netsh dhcp server \\servername scope <subnetID> add reservedip <IPaddress> <MacAddress> "ReservationName" "Comment"

If possible it would be nice to use those new shiny cmdlets 如果可能的话,最好使用这些新的闪亮cmdlet

Thanks 谢谢

Those cmdlets can also be used to manage DHCP server running on Windows Server 2008 or Windows Server 2008 R2, but executed on a machine that supports 'DHCP Server PowerShell cmdlets', for example windows 8, but you cannot run on a Windows server 2008 r2. 这些cmdlet还可以用于管理在Windows Server 2008或Windows Server 2008 R2上运行的DHCP服务器,但是可以在支持“ DHCP Server PowerShell cmdlet”的计算机(例如Windows 8)上执行,但不能在Windows Server 2008 r2上运行。

Since DHCP Server WMI provider is not supported on Windows Server 2008 and Windows Server 2008 R2, you need to use –ComputerName while using DHCP PowerShell to manage a DHCP server running on Windows Server 2008 or Windows Server 2008 R2. 由于Windows Server 2008和Windows Server 2008 R2不支持DHCP Server WMI提供程序,因此在使用DHCP PowerShell管理在Windows Server 2008或Windows Server 2008 R2上运行的DHCP服务器时,需要使用–ComputerName。

Read this post for a good detailed explanation: Microsoft Technet 阅读这篇文章以获得很好的详细说明: Microsoft Technet

Example

Add-DhcpServerv4Scope -ComputerName dhcpwin2k8server.contoso.com -Name "Lab-1 Network" -StartRange 10.10.10.1 -EndRange 10.10.10.254 -SubnetMask 255.255.255.0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Windows Server 2008 R2上通过Powershell 4.0创建计划任务? - How can I create scheduled tasks via Powershell 4.0 on Windows Server 2008 R2? 如何使用Powershell在Windows Server 2008 R2上管理本地用户帐户? - How can I manage local useraccounts on windows server 2008 r2 with powershell? 有谁知道我如何使用Powershell替换IP的DHCP保留MAC地址? - Does anyone know how I can replace the DHCP Reservation MAC address for an IP using powershell? Windows Server 2008 R2中无法通过Powershell 4导入模块Hyper-V - can't import-module Hyper-V by powershell 4 in windows server 2008 R2 Windows Server 2008 R2 PowerShell和Internet Explorer 9 - Windows Server 2008 R2 PowerShell and Internet Explorer 9 使用Powershell Windows Server 2008 R2将用户导入本地 - Import users to local with powershell windows server 2008 r2 更改芬兰语Windows Server 2008 R2上Powershell脚本的文化 - Change culture on Finnish Windows Server 2008 R2 for Powershell Script 在 Windows Server 2008 R2 上的 PowerShell 中创建专用队列 - Creating private queues in PowerShell on Windows Server 2008 R2 是否会为在Win Server 2008 R2上运行的Windows 7开发PowerShell脚本? - Will a PowerShell script developed for a Windows 7 run on Win Server 2008 R2? 使用Powershell激活Windows 2008 R2 Server - Use Powershell to Activate Windows 2008 R2 Server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM