Я продолжаю получать следующее сообщение об ошибке при попытке запустить Add-DhcpServerv4Reservation
команды в PowerShell:Add-DhcpServerv4Reservation FullyQualifiedErrorId: WIN32 1753
+ CategoryInfo : NotSpecified: (xxx.xxx.42.234:root/Microsoft/...erv4Reservation) [Add-DhcpServerv4Reservation], CimException + FullyQualifiedErrorId : WIN32 1753,Add-DhcpServerv4Reservation
(ххе имеют действительные числа IP-адрес)
I получаю эту ошибку, когда я пытаюсь запустить команду на его собственные, так:
Add-DhcpServerv4Reservation -Name test -ScopeId xxx.xxx.40.0 -IPAddress xxx.xxx.42.234 -ClientId 01-01-01-01-01-01 -Description computer -Type DHCP
Как и в следующем примере:
Import-Module DHCPServer
clear
$IP = Read-Host "Please type in the IP Address of the computer you would like to add"
clear
try {
$ReservationObj = Get-DhcpServerv4Reservation -ComputerName xxx.xxx.40.4 -IPAddress $IP -ErrorAction Stop
$Person = New-Object PSOBJECT
$Person | Add-Member "Device Name" $ReservationObj.GetCimSessionComputerName
$Person | Add-Member User $ReservationObj.Description
$MAC = $ReservationObj.ClientId
$MAC = $MAC -replace "-", ":"
$Person | Add-Member "MAC Address" $MAC
$Person | Add-Member "IP Address" $IP
Write-Output $Person | Format-List
} catch {
Write-Host "This IP address is not currently reserved and is available for use."
$Response = Read-Host "Would you like to add a new reservation for this IP address (yes)/(no)?"
if ($Response -eq "yes") {
$Description = Read-Host "Please enter the Manufacturer and Model of the device as well as it's owner (i.e its description)"
$MAC = Read-Host "Enter the computers MAC address (xx-xx-xx-xx-xx-xx)"
$Computer = Read-Host "Enter in the computer name."
Add-DhcpServerv4Reservation -Name $Computer -ScopeId xxx.xxx.40.0 -IPAddress $IP -ClientId $MAC -Description $Description -Type DHCP
Write-Host $Computer "has been added"
} else {
Write-Host "Nothing has been added"
}
}
Опять же xxx заменили бы фактические цифры, я просто не включил фактические цифры в этот пост.
Кто-нибудь знает, почему эта ошибка происходит?
Спасибо, HannesS, но я уже проходил на DHCP-сервере под именем ComputerName, так что, к сожалению, это не проблема. – beginner