Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Win32API::Net::GetDCName returns error code 87 for remote servers

by BrowserUk (Patriarch)
on Mar 29, 2016 at 18:48 UTC ( [id://1159042]=note: print w/replies, xml ) Need Help??


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

GetLastError results in error code 87 (ERROR_INVALID_PARAMETER).

The MS description of the underlying function suggest that error 87 for that api means: "The name syntax is incorrect. This error is returned if the name specified in the servername parameter contains illegal characters. "

It goes on to caution that whilst the server name can be in either DNS (microsoft.com) or Netbios (microsoft) form; the domain name can only be in the latter form.

I'm guessing that you are supplying the server name in a format that the call doesn't expect. Hard to confirm as you feel the need to redact the name in your posts. If you posted a fictitious name that is in the same form as the real ones you are using, someone might be able to see the problem.


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.
  • Comment on Re: Win32API::Net::GetDCName returns error code 87 for remote servers

Replies are listed 'Best First'.
Re^2: Win32API::Net::GetDCName returns error code 87 for remote servers
by dt667 (Acolyte) on Mar 30, 2016 at 11:16 UTC

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

      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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1159042]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-23 20:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found