PowerShell for DNS Part 3
Server Academy Members Only
Sorry, this lesson is only available to Server Academy Full Access members. Upgrade your plan to get instant access to this and many more premium courses. Click the Upgrade Plan button below to get started.
In this lecture, we will be creating DNS records using the ISE. I recommend that you copy and paste the commands into the command pane of PowerShell. That’ll save you a good bit of typing. Checkout the commands listed below.
Let me show you a little more about the ISE
First, we need to configure our panes. There are several different configurations
- Press this button if you want your Scripting pane on top and the command pane on the bottom.
The scripting pane is where I’ll be working.
The command pane is where you’ll be pasting your commands.
- You can press this button, if you prefer the scripting pane on the right and the command pane on the left
- Or you can click show scripting pane maximized.
- Or you can click this button and hide the scripting pane completely. This configuration is probably what you want for this lecture.
So again, I recommend that you copy and paste from the document as we work our way through the list of commands, like this.
First Highlight the command press Ctrl C, then click in the command windows then press Ctrl V, then press return, and you get a response.
Then you can type CLS and press return to clear your screen.
I recommend that you work right along with us even if you have to stop the video while you copy and paste the commands.
Anyway, the main thing is that you get familiar with the commands and how they work.
What we’re going to do is go through each of these commands one at a time and I’ll explain each command as we work our way through the list.
Now let’s verify our zone information – I’ll go ahead and open my script
- This command returns all the zones from the local server.
And there’s our zone information. Notice my forward lookup zone instructorpaul.com And our reverse lookup zone 2.0.10.in-addr.arpa
- Your zone information will be different, but the command still works the same way. First, we’ll clear the screen, type cls, and press return.
- Now let’s add an A host record
Add-DnsServerResourceRecordA -Name client123 -zonename instructorpaul.com -IPV4Address 10.0.2.50
- If your following along after you paste the command into PowerShell, you’ll need to change the forward lookup zone from intructorpaul.com to your zone name or your forward lookup zone.
- The IPV4Adress reflects the IP address of the Windows 10 computer your assigning a host record to.
In this case, it would be client123. You’ll want to change that address to reflect your network.
- Now go back to DNS manager and verify that the record has been created.
- From your server open server manager, click tools then click DNS
We used the command Add-DnsServerResourceRecordA
- So, lets open our forward lookup zone. And its instructorpaul.com. And as you can see our new host record has been created. Our host name is client123. There’s our record host A and there’s out IP address 10.2.0.50
- Now let’s say you just want to display only the A-host records
Get-DnsServerResourceRecord -zonename InstructorPaul.com -RRType A
• Let’s go ahead and execute that command, and as you can see, the command displays only our A host’s records. There’s our new host client123
Now let’s create a PTR record
Before I clear the screen, I want to remind you that the last octet of my host client123 is
Server Academy Members Only
Want to access this lesson? Just sign up for a free Server Academy account and you'll be on your way. Already have an account? Click the Sign Up Free button to get started..
Hello, where can I find the download you are referring to in the lecture?
Hi Kadiatou Balde
I understand that the video says about the pdf file to download, but the commands were added as part of the video transcription. You can copy and paste from there to your lab machine.