You will have to know the client names of your PC's you are looking to reserve. In our case we knew they were all staff (teacher) PC's that were named with the same naming convention of: macbookpro-xxxx.
Here are the steps as I did it on server 2008r2
- Go into your DHCP management.
- Open up the scope where the computers you want reservations for grabbed their DHCP address from.
- Go into the Address Leases and sort them by name.
- Under "more actions" click on "export" and be sure to save the exported file as a csv file somewhere.
- Edit the CSV file with excel and remove all the rows containing the PC's you do not want reservations for.
- Remove all the columns for the PC's you are reserving the IP for except for the IP, MAC address and Name column.
- You can either edit the IP address of each of the PC's in the CSV file manually to the reserved IP you want to give it, or come up with an excel formula for that column.
- Save the CSV and run this script. (Be sure to read the script thoroughly and understand you will need to modify it for the file locations of where its reading the CSV file from and saving the powershell script its building to).
-Once you run the script it will build a powershell script with the info from the csv file you modified and saved. Run that powershell script and your reservations will be in place!
Cheers!
No comments:
Post a Comment