win32net.NetValidateName

NetValidateName(Server, Name, NameType, Account, Password)

Checks that domain/machine/workgroup name is valid for given context

Parameters

Server : string/PyUnicode

Name of server on which to execute (None or blank uses local)

Name : string/PyUnicode

Machine, domain, or workgroup name to validate

NameType : int

Type of name to validate - from NETSETUP_NAME_TYPE enum (win32net.NetSetup*)

Account=None : string/PyUnicode

Account name to use while validating, current security context is used if not specified

Password=None : string/PyUnicode

Password for Account

Comments

If Account and Password aren't passed, current logon credentials are used

Will raise NotImplementedError if not available on this platform.

Return Value

Returns none if valid, exception if not