0

Administrators have restricted RDP access to our DHCP server.

I need to add an IP address reservation for a MAC address.

How do I remotely add an IP address reservation on the DHCP server using PowerShell?

1

2 Answers 2

1

Use Add-DhcpServerv4Reservation:

Add-DhcpServerv4Reservation -ScopeId 10.10.10.0 -IPAddress 10.10.10.8 -ClientId "F0-DE-F1-7A-00-5E" 

You can also run it against a remote DHCP server using the -ComputerName parameter.

0

You coild also rekord powershell using invoke-command and then then commando provided earlier

 $ComputerName = "DHCP_Server_Name" $ReservationParams = @{ ScopeId = "Your_DHCP_Scope_ID" IPAddress = "Reserved_IP_Address" ClientId = "MAC_Address" HostName = "Client_Host_Name" } Invoke-Command -ComputerName $ComputerName -ScriptBlock { param($ReservationParams) Add-DhcpServerv4Reservation @ReservationParams } -ArgumentList $ReservationParams 

Keep in mind that invoke-command is part of remote powershell and that has some requirements

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.