Skip navigation

Q. How can I retrieve the current computer's computer name if it exceeds 15 characters?

Starting with Windows 2000, computer names of up to 63 characters are supported.

For backward compatibility reasons, the sAMAccountName is limited to a 15 character name followed by a $.

The ComputerCN.bat script retrieves the computer's Common Name, which contains all the characters, up to 63, that you entered when creating the computer.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.