PowerShell for DNS Part 3

Sign up to access this lesson

Click here to sign up and get access to this lesson!

Saving Progress...

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 

Get-DNSServerZone  

  • 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

.50.   

Sign up to access the rest of this lesson

You must either log in or sign up to access this lesson.

Saving Progress...

0 0 votes
Lesson Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments

Installing and Configuring Domain Name System (DNS)

0%

0/1 Lessons

Course Introduction

• 10min

0 / 2 lessons complete

DNS Basics

• 1hr 16min

0 / 8 lessons complete

DNS Resource Records

• 46min

0 / 5 lessons complete

DNS Zones

• 4hr 11min

0 / 12 lessons complete

DNS Delegation

• 50min

0 / 4 lessons complete

DNS Security Techniques

• 36min

0 / 5 lessons complete

Advanced DNS Topics

• 22min

0 / 5 lessons complete

DNS Security (DNSSEC)

• 1hr 16min

0 / 6 lessons complete

DNS Policies

• 55min

0 / 6 lessons complete

PowerShell for DNS

• 1hr 27min

0 / 6 lessons complete

Troubleshooting DNS Issues - Troubleshooting Tools

• 1hr 39min

0 / 8 lessons complete