Skip to content

Instantly share code, notes, and snippets.

@techdecline
Created March 6, 2019 07:58
Show Gist options
  • Select an option

  • Save techdecline/39561ad1d1dba98166e250d7e1d832dc to your computer and use it in GitHub Desktop.

Select an option

Save techdecline/39561ad1d1dba98166e250d7e1d832dc to your computer and use it in GitHub Desktop.
$reservationArr = Get-DhcpServerv4Reservation -ScopeId 192.168.0.0 -ComputerName cm-dc1
foreach ($reservationObj in $reservationArr) {
Set-DhcpServerv4OptionValue -OptionId 66 -Value "bootserver1.decline.lab" -ReservedIP $reservationObj.IPAddress -ComputerName cm-dc1
Set-DhcpServerv4OptionValue -OptionId 67 -Value "/tftp/bootfile.0" -ReservedIP $reservationObj.IPAddress -ComputerName cm-dc1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment