Link to home
Start Free TrialLog in
Avatar of Zack
ZackFlag for Australia

asked on

Adding a DNS A record to Windows Server Core Machine via Powershell

Heyas,

How would I add a DNS A record to Windows Server Core Machine via Powershell. The 'A; record would need to include:

- Name
- FQDN
- IP Address

Any help much appreciated.

Thank you.
Avatar of Kwoof
Kwoof

Is DNS running on your core machine?, or you want to add a DNS record to point to your core machine?...or do you need to modify your hosts file on the core machine?

Is your Core machine configured?  Corefig can help with a GUI if you need it:

http://corefig.codeplex.com/
Avatar of Zack

ASKER

Hi Kwoof,

DNS is running on my core machine.  I tried using the New-DnsRecord command but it doesn't work

"New-DnsRecord : The term 'New-DnsRecord' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

Thank you.
What OS is the server core?
You could use the Remote Server Administration Tools (RSAT) on your own computer to remotely manage the DNS server.

http://blogs.dirteam.com/blogs/sanderberkouwer/archive/2008/04/27/remotely-managing-your-server-core-using-rsat.aspx
Avatar of Zack

ASKER

The server core OS is Windows Server 2012.

Thank you.
I had assumed you already tried RSAT?
Avatar of Zack

ASKER

Hi Kwoof,

I have extracted Corefig onto the Server Core how do I run it? When I type in the script file name ".\start_corefig.wsf all I get is >>

Confused I thought a GUI would load.
Avatar of Zack

ASKER

Hi Kwoof,

As I understand there is no RSAT feature for Windows Server 2012, could you clarify.

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of Mahesh
Mahesh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
U can use the cmdlet: Add-DnsServerResourceRecordA

Eg. Add-DnsServerResourceRecordA -ZoneName ZONENAME –Name Server2 -IPv4Address 10.10.10.2

^ that is exactly what you do. But first be sure to import the module.

Import-Module DNSServer

Open in new window

Avatar of Zack

ASKER

Thank for the help.