This documentation is archived and is not being maintained.
ComputerInfo::GetComputerDomain Method
Visual Studio 2013
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
| 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. |
- 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.
Show: