Greetings, I'm Professor Kay and initiate video presentation, we're going to see how we go about installing DHCP and configuring the role using PowerShell up inside of server 2019. So to begin this process, let's go down here to the start menu. And from the start menu, we're going to find our PowerShell. And we're going to right click, and we're going to select to run as administrator. Always a good habit to get into when you're running PowerShell is just to run it as administrator. So let's go ahead and bring up the instructions for installing PowerShell.
Now this is up inside of the lab for DHCP. And it's underneath the lesson four install the DHCP role using PowerShell. Now what I've done in here is I've gone through step by step and I've showed you how I came upon the settings from the configuration. These are my settings for My DHCP server, yours will probably differ. But all you have to do is just change the numbers. Let's go over this real quick.
These first three octets of the IP address are the networking portion of my IP. The last octet represents the host IP that is assigned to that machine. If you look at my server, you'll see that it has an IP address assigned to it of 192 dot 168 dot 145 10. Well, this will be the IP address for my DHCP server, my DNS server as well as my Active Directory server. So it's important that you connect the dots and make this connection. This is how I'm coming up with this IP addressing scheme that I'm using for my DHCP server.
Alright, let's get back on over here to the actual lab. Now. You can follow the steps here. There's only four steps that you have to do. in PowerShell, to install and configure your DHCP server, so the first thing we're going to want to do is install that DHCP server role. So I'm just going to go up here inside of my lab, I'm going to go ahead and copy, I'm going to go on back over here to my PowerShell.
And if I have the tools installed properly for this virtual box, the Guest Additions that is, I won't have any problem copying and pasting from my host to my virtual machine. And there you go. So all I did was put my mouse at the cursor, and I clicked on my right mouse button, and it put it in automatically for me. So now we're ready to just hit Enter. And in just a moment, we will have our DHCP server role installed. So the DHCP server role has been installed and we can now move on with Configuring our DHCP server using our settings that we've already set up inside of the lab.
So the next thing we're going to do is we're going to add in our DHCP server scope, which will include the start range for our IP addressing, and the end range for our IP addressing along with our subnet mask. So let's just go ahead and grab this from the lab, returned to our server and bring up our PowerShell. And we'll just paste what we just copied from the description. And we'll hit Enter. And so it comes back to the prompt letting me know that this command completed successfully. So let's go on and proceed with the lab.
And we'll continue on with step number three which is add the DNS server and the router gateway option in DHCP. Now what is the router gateway option? Well that is the IP address of the internal interface of your router or your firewall that is going to direct users off of your network when they can't find what it is they are looking for locally. So what I'm going to do now is I'm just going to take step three. And I have already configured the IP address for my DNS server, which is the same as my DHCP server, and the router IP for the internal interface. I'm just going to copy that.
Let's go back on over to our PowerShell and I right click, and I paste the command into the PowerShell prompt. So we're going to go ahead and set this information up inside of my DHCP server. Let's go ahead and hit Enter. And it comes back very quickly letting me know that the command completed successfully. And this next step of the lab, we're going to go ahead and set the lease duration in this case, I have set it to eight hours, which means that users will keep their lease from hours and 50% of the lease, they'll come back up and they will request a renewal. If they don't get that renewal at 50%, they'll come back at 75%.
And they'll request a renewal. Alright, so let's go ahead, go on back over to our PowerShell. And so we're in here to set the DHCP lease duration, and identify the scope ID as being 192 dot 168 dot 145 dot 10. Let's go ahead and hit Enter. And it comes back to the prompt letting me know that the command completed successfully. Now we're done here.
So let's go ahead and take a look at our DHCP roll up inside of Active Directory tools. To do this, I'm just going to go ahead and launch Server Manager. Now when Server Manager is up, we can just go to Tools and you'll see that we have the DHCP role present I click on the DHCP server role that's going to take me up inside of the DHCP Management Console. Now, there's also something that you have to do here with your DHCP server. So let's back up just a little bit, we have to identify those who are authorized to manage our DHCP role. This is very easy, you're going to get this yellow triangle.
And all you have to do is just click on it, click on that URL that it provides, and just step through the wizard real quick. We can go ahead and accept the default that the administrator will be the one who can modify and make changes to the DHCP server. Go and say commit. And that is done we can close. All right, now we can go up to tools, and we can go into the DHCP server. And we'll go ahead and make this full screen move over our window here on the left just a little bit, so we see what we're doing.
And we can expand this. Now we don't have an IP version six scope. That's not needed. But we do have our scope identified as being 192 dot 168 dot 145 dot zero, that's our scope. You can expand all this and now you have the scope options. And these are the options that we configured up inside of PowerShell for our DHCP server, so you can go to the address pool, and there's the starting IP address and there's the ending IP address, you're gonna need scope options.
And there is the router IP address and there's your DNS server address. So we have now configured our DHCP server very, very quickly using PowerShell. And now there is some prior planning to this. But if you understand your scope Your network range and your host IP range, you should have no problem configuring a DHCP server either for server 2012, server 2016 or server 2019. And so that's going to conclude this short video presentation on how I go about configuring the DHCP role for server 2019 using PowerShell. So if you have any questions or you have any concerns about any of the information that was provided for you in this short video presentation, please do not hesitate to reach out contact your instructor and I'll see you in my next video.