Install DHCP server with the Powershell

DHCP server setup with the powershell.

# Connect remotely if remote installation is required Enter-PSSession -ComputerName DC01 # View feature by name Get-WindowsFeature -Name * DHCP * -ComputerName DC01 # Install DHCP Server Install-WindowsFeature -ComputerName DC01 `-name DHCP` -IncludeAllSubFeature ` -IncludeManagementTools # Complete DHCP configuration. Obtain authorization against the AD. Add-DhcpServerInDC -DnsName DC01 -IPAddress # Get DHCP Server Get-DhcpServerInDC # DHCP Create 1 Domain Add-DhcpServerv4Scope -ComputerName DC01 `-name" Human Resources "` -Description "Eat" `-StartRange` -EndRange `SubnetMask `-LeaseDuration 08: 00: 00` -State Active `-Type DHCP` -PassThru # Create DHCP Scope 2 Add-DhcpServerv4Scope -ComputerName DC01 `-Name" Marketing "` -Description "Eat" `-StartRange` -EndRange `-SubNetMask` -LeaseDuration 08: 00: 00 `-State Active` -Type DHCP `-PassThru # Range Control DHCP Get-DhcpServerv4Scope -ComputerName DC01 # Create SuperScope - Merge 1 Area and 2 Add-DhcpServerv4Superscope` -SuperscopeName 'TK Attachment `` -ComputerName DC01 `ScopeId, # Multicast Scope Add-DhcpServerv4MulticastScope` -ComputerName DC01` -Name 'Audio Video' `-Description 'Audio Video Transfer'` -St artRange `-EndRange` State InActive `-LeaseDuration 15: 0: 0: 0 # Range Control Mutlicast Get-DhcpServerv4MulticastScope -ComputerName DC01