Create DHCP Reservations with Powershell
One of my colleagues asked me to create multiple DHCP reservations by using a csv file. Here is how we can do that.
First we need to create the csv file in the following format
ScopeId,IPAddress,Name,ClientId,Description
10.50.32.0,10.50.32.250,test,1a1b1c1d1e1f,test desc
There might be a confusion between Scope Id and Scope name. Your Scope Id is basically in the ip address format, not a name. Scope Id in the scope below is 10.200.0.0
Just run the following command
Import-Csv dhcp.csv | Add-DhcpServerv4Reservation
- Hits: 4860