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)
Syntax
'Declaration
Public Shared Function GetComputerDomain ( _
    computerNameOrAddress As String, _
    logger As ITFLogger _
) As String
public static string GetComputerDomain(
    string computerNameOrAddress,
    ITFLogger logger
)
public:
static String^ GetComputerDomain(
    String^ computerNameOrAddress, 
    ITFLogger^ logger
)
static member GetComputerDomain : 
        computerNameOrAddress:string * 
        logger:ITFLogger -> string
public static function GetComputerDomain(
    computerNameOrAddress : String, 
    logger : ITFLogger
) : String
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
Exceptions
| Exception | Condition | 
|---|---|
| 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. | 
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.