Question

Where does Windows store WINS information specified under DNS administration utility?

Asked by: FADVMSAdmin

I'm working to automate some information gathering about our many DNS servers in the enterprise.  I've run across a snag.  For DNS zones that are configured to forward unresolved queries to WINS, I cannot seem to pull which WINS servers are specified via script.

As part of my script I'm pulling information from the root\MicrosoftDNS WMI namespace, specifically from the MicrosoftDNS_Zone namespace.  In this namespace, each zone has a property called 'UseWins'.  With this property I can successfully gather which zone(s) are forwarding to WINS.  Unfortunately Windows doesn't seem to store the WINS servers in use under this same WMI namespace.

I've found for non-AD integrated DNS zones, the WINS information is stored in the DNS text file for the zone.  I guess I could pull that info from here, however where does AD integrated zones store this information??

Does anyone have any ideas how to get this information?

TIA,
MCDONAMW

In MicrosoftDNS_Zone, there's an

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-08-20 at 13:46:21ID24669594
Tags

DNS

,

WINS

,

Windows

,

Windows 2003

Topics

Domain Name Service (DNS)

,

Windows 2003 Server

,

Scripting Languages

Participating Experts
3
Points
500
Comments
20

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. WMI: Invalid namespace
    within the Properties of any services under services.msc when you choose the dependencies tab i get the follwing error msg WMI: Invalid namespace the 'root\cimv2' namespace is not defined in the WMI repository Things I've tried sfc /scannow winmgmt /resyncperf -p w...
  2. Disjointed DNS namespace
    We have worked ourselves into a predicament and could really use some advice. We have two windows 2000 servers running on a network.. lets call them server1 and server2. Server 1 was a NT4 PDC that was upgraded to Windows 2000 and is the first domain controller in our Act...
  3. Gather DNS Information from Remote Machine
    Are there any tools, scripts, or otherwise out there that can gather the primary DNS information from a remote machines within an internal network? I know getmac, for example, can retrieve the MAC from a remote machine, but I was wondering if there was something out there to...
  4. HTA to gather user information
    I currently have pieced together an HTA file to gather some needed user info for the purpose of an internal ticket system. I use the HTA file to gather some basic information about the user so I can then pre-fill things in a ticket. This makes the ticket system just as easy...
  5. WMI to DELETE DNS Zone or DNS Domain
    I'm unable to find a way to delete a DNS Zone or a DNS Domain through WMI. I'm a C# coder. I have been able to delete DNS Records by selecting them and invoking the delete method (see below). But it looks like there is no method in the MicrosoftDNS namespace to delete a DNS...
  6. WMI (Win32_DfsTarget) not returning instances remotely
    This one is a little strange, and not sure if this is the right forum. We have two main 2008 R2 DFS namespace servers that also host a number of links / targets to various shares. One of them currently has all namespaces and links disabled. No matter what script or WMI ...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: ChiefITPosted on 2009-08-20 at 15:13:16ID: 25147632

First off, you need to separate WINS and DNS. They are similar in many ways. In fact DNS was modeled after WINS, to replace WINS. I don't think they interact with one another.

I have heard this before that DNS will revert to a WINS query. But, I don't believe it. Most administrators, don't have a WINS database, at all. Instead they rely upon netbios broadcasts. That is saved in the cace files of every machine. To see your netbios cache, go to the command prompt and type NBTstat -c, I think. Since this is a cached value, it is saved on residual memory, not a hard drive location.

 

by: grayePosted on 2009-08-21 at 06:04:58ID: 25151353

You'll find what you need via Windows Management Intrumentation (WMI) in the Win32_NetworkAdapterConfiguration class

strComputer = "." 
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") 
Set colItems = objWMIService.ExecQuery( _
    "SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True",,48) 
For Each objItem in colItems 
    Wscript.Echo "-----------------------------------"
    Wscript.Echo "Win32_NetworkAdapterConfiguration instance"
    Wscript.Echo "-----------------------------------"
    Wscript.Echo "IPEnabled: " & objItem.IPEnabled
    Wscript.Echo "WINSPrimaryServer: " & objItem.WINSPrimaryServer
    Wscript.Echo "WINSSecondaryServer: " & objItem.WINSSecondaryServer
Next

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:

Select allOpen in new window

 

by: FADVMSAdminPosted on 2009-08-21 at 07:07:17ID: 25151916

Thank you for both of your responses above.  Unfortunately neither help in my situation.

@ChiefIT:  DNS does in fact work with WINS.  While yes, WINS shouldn't need to be used in most cases, there are many cases where it still must exist.  My company for example still has an NT4 domain (trying really hard to phase out).  As such WINS is a requirement.  Also in a company that has many disparate domains, WINS often helps with communications between all of these domains.  Otherwise we have to go setting DNS suffices on all of the workstations that need to cross domains.  Unfortunately using FQDN isn't always an option.

BTW, see here to cure your disbelief :)  - http://technet.microsoft.com/en-us/library/cc781381(WS.10).aspx.  Also see attached screenshot.

@graye:
Your WMI query is pulling the WINS addresses that are tied to the NIC itself of a system.  What I am referring to is a configuration within the Microsoft DNS Administration tool for DNS servers.  This is a completely seperate thing.  See attached screenshot for example.

Anyhow, thanks again to you both for attempting to help!

-mcdonamw

 

by: FADVMSAdminPosted on 2009-08-21 at 07:27:11ID: 25152123

Well go figure.  The link I produced for ChiefIT may lead to a solution.  That URL is:  http://technet.microsoft.com/en-us/library/cc781381(WS.10).aspx.

Based on the information at this URL, when this option is selected in the DNS admin tool, new resource records are added to the zone containing the WINS servers that were entered in the configuration.  I would think I would simply just need to query for those records from within the zone.

When I look at the zone records from within the DNS admin tool, I do indeed see new resource records of a "WINS Lookup" type.  The URL above also states that these WINS records are included as part of a zone transfer, however I do not see these records while doing zone transfers using standard DNS tools (e.g., NSLOOKUP/DIG).  As such it seems there's no way for me to query for these records outside of the DNS tool, as far as I can tell anyway.

Anyone know how to pull these records?

-mcdonamw

 

by: ChiefITPosted on 2009-08-30 at 01:13:16ID: 25216738

systemroot\System32\Wins

You pull them from a pull partner: (See WINS replication pull partners)
http://technet.microsoft.com/en-us/library/cc776675%28WS.10%29.aspx

 

by: FADVMSAdminPosted on 2009-08-31 at 07:12:01ID: 25222916

Unfortunately, this doesn't help either.  This is assuming WINS is installed on the same server in question.  It's not.  My DNS zone is set up with WINS forwarding to completely different servers.  These server are what I'm trying to detect.

Once again I have to note, this has nothing to do with the WINS service itself.  This is a configuration within DNS.

 

by: FADVMSAdminPosted on 2009-08-31 at 07:44:01ID: 25223186

If it helps, I'm attaching another screenshot of what information I'm looking for.  I simply need to find a way to command-line query for the WINS resource record (RR) listed underneath a zone.  This record is only created if you configure WINS Forwarding on the DNS zone.  No DNS tools I've tried can seem to pull this record (e.g., Dig, NSlookup, DNSCMD).

Thanks!

 

by: ChiefITPosted on 2009-08-31 at 08:09:54ID: 25223379

"NBlookup" is the WINS version of NSlookup:

http://support.microsoft.com/kb/830578
__________________________________________________________
NBTSTAT -r:

lists the names resolved by broadcast and by WINS:
In fact NBTSTAT -? gives you a list of commands for netbios translation
___________________________________________________________
In addition: >Netstat< or >Portqry< checks your ports to see if they are listening or blocked:

The ports for netbios over TCP/IP and Netbios over SMB are:
137 WINS Netbios port UDP
138 Netbios datagram UDP
139 Netbios datagram TCP

Netbios overSMB:
Netbios over SMB port 445 UDP
139 Netbios datagram port TCP

Portqry is used in this syntax:
portqry -n myserver -p both -o 127,128,129,445

or for further details:
http://support.microsoft.com/kb/832919

and can be downloaded here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=89811747-C74B-4638-A2D5-AC828BDC6983&displaylang=en
 __________________________________________________________
There is no tool that I know of, like DIG, for netbios/WINS. Unlike DNS, WINS is populated via netbios broadcasts upon boot.

Netsh is the closest you can get to a command line interface, (that could take the place of a console-based admins), for WINS:

Syntax and a full list of Netsh commands is avail here:
http://technet.microsoft.com/en-us/library/cc779375%28WS.10%29.aspx
__________________________________________________________
If this is truley under DNS as its own lookup zone. DNS tools should be able to see these records, (like Dig). Other than that, WINS should be kept under a different folder, (systemroot\System32\Wins), of the WINS server itself. That brings me back to my original post that WINS and DNS are separate and don't query each other. I am going to rephrase that to, they don't interact unless otherwise configured to do so.

The tools used for WINS management usually assume you are querying the WINS server's database, rather than the DNS server's database for WINS records. I would try DNS tools to see what they bring up, since you are looking into the DNS zones for WINS records.

 

by: ChiefITPosted on 2009-08-31 at 08:18:31ID: 25223466

Just had a chance to look at your last post:

Ok, that record you pointed out, is a WINS server pointer record. So, it is querying the WINS database on the other server and not a forward lookup zone.

The WINS tools should work for you. Netsh as the command line console for WINS, NBlookup as a troubleshooting utility, portqry and netstat as a port utility, NBTstat will be mostly for Broadcasts and cache and a little querying on the server.




 

by: FADVMSAdminPosted on 2009-08-31 at 08:18:55ID: 25223470

@ChiefIT:
With all due respect, you seem to be missing something integral to my question.  What I'm referring to has *nothing* to do with NetBios.  I am completely aware of the difference between WINS and DNS and the tools that are used to manage each.  In fact I feel I'm pretty proficient at these tools/technologies.  This special case, however, is throwing me off.

At any rate, to clarify what I'm looking for please look at the last screenshot I posted.  I am looking for a DNS resource record that is added to the DNS zone.  This RR is of type "WINS".  

In this case, WINS is *integrated* into DNS.  As such, WINS tools will not help.  The standard Microsoft DNS admin utility can see the records (as indicated/highlighted by my screenshot), but standard command line tools seem to not have the ability to see them (or I just simply don't know how to query for these *special* RRs).

Thanks for your many attempts to help!

 

by: FADVMSAdminPosted on 2009-08-31 at 08:26:02ID: 25223528

@ChiefIT
You snuck another post in before my last post... :)

"Just had a chance to look at your last post:

Ok, that record you pointed out, is a WINS server pointer record. So, it is querying the WINS database on the other server and not a forward lookup zone.

The WINS tools should work for you. Netsh as the command line console for WINS, NBlookup as a troubleshooting utility, portqry and netstat as a port utility, NBTstat will be mostly for Broadcasts and cache and a little querying on the server."

Herein lies the issue.  In order to use a WINS tool, I have to know *which* server to point at.  This server is what I'm trying to find!!!  The WINS server that is highlighted in that last screenshot is *hardcoded* in the DNS admin utility.  I don't actually want to *query* WINS.  I want to find out which *WINS servers* are hardcoded into DNS.  Does that make sense?

To make it more simple... say you have  Server1 (that has DNS only installed).  Server1 has Zone1 that is configured with WINS forwarder lookup, pointing to Server2 and Server3 (both WINS only servers).  In this case, you currently don't know Server2 and Server 3 even exists as some other Admin set this up.

Your/My Goal:  Query Server1 (it's the only server YOU are aware about) asking it "which WINS servers is your DNS zone forwarding to", and have it return Server2 and Server3.  

 

by: ChiefITPosted on 2009-08-31 at 08:26:17ID: 25223530

That (SAME AS PARENT) record is just a pointer record to the WINS servers. DNS does the same thing. SAME AS PARENT to all DNS servers. It specifies the location of the WINS server so that DNS can access the WINS database. This is a form of a SRV (SeRVice) record that is added to DNS when you tell DNS to query WINS if DNS fails.

In other words, you are querying the WINS database, not the DNS database for WINS records. Netsh and NBlookup will work for you.

 

by: ChiefITPosted on 2009-08-31 at 08:29:23ID: 25223563

You snuck one in there for me too.

Let me look into achieving our goal. In the meantime, get familiar with NBlookup. It's just like NSlookup.

 

by: FADVMSAdminPosted on 2009-08-31 at 08:33:57ID: 25223615

@ChiefIT:
> That (SAME AS PARENT) record is just a pointer record to the WINS servers.

EXACTLY!  I know this.  This (Same as parent) pointer record to the WINS servers is what I'm trying to query for.  DNS command line tools seem to not be able to *see* this record.  I have no intention of actually finding anything further than this (which would require a netbios lookup tool).  I'm simply looking to find out how a DNS server and its zones are configured.  This WINS RR is the only thing tripping me up.

It looks like you now know what I'm looking for based on your last post.  If you find anything, I'd love to hear it!  Thanks again!  

 

by: Chris-DentPosted on 2009-08-31 at 10:00:10ID: 25224376


The record sits in the zone file like this:

@                       0      WINS      L2 C900 ( 1.2.3.4 )

Where 1.2.3.4 would be replaced a space delimited list of WINS servers, and @ is the zone name, or "same as parent folder".

You can query for it with NsLookup where domain.com is replaced with the zone name:

NsLookup -q=wins domain.com

Dig can't, it doesn't have a definition for the "WINS" record type (afaik).

You can get it from WMI as well:

http://msdn.microsoft.com/en-us/library/ms682748(VS.85).aspx

A quick PowerShell snippet to get that would be:

Get-WMIObject -Namespace root\MicrosoftDNS -Class MicrosoftDNS_WINSType -Computer server

Equally possible in VbScript, but I'm heading out now (making the most of the bank holiday) but if you need it I'll happily post how later on (probably tomorrow morning).

Chris

 

by: FADVMSAdminPosted on 2009-08-31 at 10:08:10ID: 25224451

Thank you Chris!!!!  I knew you could answer this with ease :).  I tried most of my testing with Dig.  I didn't get granular with NSLookup (shame on me for not testing that).  I guess I assumed since Dig couldn't do it (with a zone transfer no less), then it just wasn't possible.

Thanks again.  I should be good to go now!

-MCDONAMW

 

by: FADVMSAdminPosted on 2009-08-31 at 10:08:45ID: 31618564

Thanks again Chris-Dent!!  

 

by: FADVMSAdminPosted on 2009-08-31 at 10:10:06ID: 25224466

Just a note to anyone that runs across this thread...  The information about the WINS record residing in the zone file is true (and I was aware of this).  Unfortunately there is no zone file (that I'm aware of) for an AD integrated zone.  Just an FYI.

 

by: ChiefITPosted on 2009-08-31 at 11:01:15ID: 25224873

Thanks Chris!!

 

by: Chris-DentPosted on 2009-09-01 at 01:28:10ID: 25229470


Correct about the zone file, the data is held as a collection of dnsNode objects under a dnsZone. The actual record data is encoded in the (multi-value) dnsRecord attribute of those dnsNode objects as a Binary Large Object (which lacks any official documentation). I have a decode for most of the dnsRecord attribute here:

http://www.highorbit.co.uk/?p=1097

I must add the WINS record type to that though, forgot about it when I was testing the rest :)

Chris

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...