Created
January 24, 2018 07:26
-
-
Save andrewbbrown/79b4a3a03217246c00bf996f98d7e7d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
# Boxstarter options | |
$Boxstarter.RebootOk=$true | |
$Boxstarter.NoPassword=$false # Is this a machine with no logon password? | |
$Boxstarter.AutoLogin=$true | |
# Create an IPv4 DHCP Server Scope | |
Add-DhcpServerv4Scope -Name "ManagementNetwork" -StartRange 10.67.36.30 -EndRange 10.67.36.39 -SubnetMask 255.255.255.0 -LeaseDuration = 00.00:30:30 -State Active | |
# Set the Router Option value | |
Set-DhcpServerv4OptionValue -ScopeId 10.67.36.0 -DnsServer 10.67.36.4 -DnsDomain foobar.local -Router 10.67.36.2 | |
# Create DHCP Option definition 150 for TFTP | |
Add-DhcpServerv4OptionDefinition -OptionId 150 -Type IPv4Address -Name "TFTP-Server" | |
#Set the DHCP Option Value for Option 150 | |
Set-DhcpServerv4OptionValue -ScopeId "10.67.36.0" -OptionId 150 -Value 10.67.36.25 | |
Adding a DHCP Server Reservation via MAC ID address (ClientId) | |
#Add-DhcpServerv4Reservation -ComputerName someservername -ScopeId 10.67.36.0 -ClientId 30054405308 -Name DescribingName -IPAddress 10.67.36.35 | |
Write-BoxstarterMessage "Machine is complete!" | |
} catch { | |
Write-ChocolateyFailure 'Boxstarter Error: ' $($_.Exception.Message) | |
throw | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment