in reply to Re: Win32API::Net::GetDCName returns error code 87 for remote servers
in thread Win32API::Net::GetDCName returns error code 87 for remote servers

For server, I have tried: "BW2012R2", "BW2012R2.TESTLAB". My domain is "TESTLAB"

  • Comment on Re^2: Win32API::Net::GetDCName returns error code 87 for remote servers

Replies are listed 'Best First'.
Re^3: Win32API::Net::GetDCName returns error code 87 for remote servers
by BrowserUk (Patriarch) on Mar 30, 2016 at 11:21 UTC

    According to this netbios names are padded to 15 (or maybe that is 16, somewhat confusing) characters with spaces.

    My suggestion is to run the command nbstat command and see what it thinks the names are.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
    In the absence of evidence, opinion is indistinguishable from prejudice.

      nbtstat output:

      NAME Type Status --------------------------------------------- BW2012R2 <00> UNIQUE Registered TESTLAB <00> GROUP Registered BW2012R2 <20> UNIQUE Registered

      I tried padding the server string out to 15 and 16 characters using space with the same result.

        Take another look at https://technet.microsoft.com/en-us/library/cc738412(v=ws.10).aspx; in particular the bit that says:

        For example, when you attempt to connect to a computer called CORPSERVER, the NetBIOS name corresponding to the File and Printer Sharing for Microsoft Networks service on that computer is:

        CORPSERVER     [20]

        Note the use of spaces to pad the computer name. Before you can establish a file and print sharing connection, a TCP connection must be created. In order for a TCP connection to be established, the NetBIOS name "CORPSERVER     [20]" must be resolved to an IP address.

        Which suggests to me you need to include the numbers in brackets at the end also. Ie. "BW2012R2 <00>".

        The difference/meaning between your output containing <nn> and the example containing [nn] is something you'll have to resolve through trial and error.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
        In the absence of evidence, opinion is indistinguishable from prejudice.