This documentation is archived and is not being maintained.

ComputerInfo::GetComputerDomain Method

Gets a NetBIOS domain name of the specified computer. This method is only supported on computers that are joined to a domain.

On computers that are not joined to a domain, this method throws TfsAdminException exception.

Namespace:  Microsoft.TeamFoundation.Common
Assembly:  Microsoft.TeamFoundation.Common (in Microsoft.TeamFoundation.Common.dll)

public:
static String^ GetComputerDomain(
	String^ computerNameOrAddress, 
	ITFLogger^ logger
)

Parameters

computerNameOrAddress
Type: System::String

DNS or NetBIOS name of the computer or its ip address.

logger
Type: Microsoft.TeamFoundation.Common::ITFLogger

Return Value

Type: System::String

ExceptionCondition
ArgumentNullException

computerNameOrAddress is null.

ArgumentException

computerNameOrAddress is an empty string.

SocketException

An error is encountered when resolving the computer name.

TfsAdminException

Cannot resolve domain name.

Show: