ConfigurationManager.ServerMachineDomainName

[This documentation is preliminary and is subject to change.]

The ServerMachineDomainName property retrieves the Domain Naming System (DNS) name of the AD RMS server.

Property ServerMachineDomainName

Property Value

This property returns a string that contains the DNS name. This property is read-only.

Remarks

The property value is retrieved from Active Directory and is a DNS name such as mydomain.microsoft.com. The format of a DNS name is host.entity.domain. For more information about DNS, see RFC 1034 (Domain Names?Concepts and Facilities), and RFC 1035 (Domain Names?Implementation and Specification).

Example Code

DIM config_manager
DIM admin_role

' *******************************************************************
' Create and initialize a ConfigurationManager object.

SUB InitObject()

  CALL WScript.Echo( "Create ConfigurationManager object...")
  SET config_manager = CreateObject _
    ("Microsoft.RightsManagementServices.Admin.ConfigurationManager")      
  CheckError()
    
  CALL WScript.Echo( "Initialize...")
  admin_role=config_manager.Initialize(false,"localhost",80,"","","")
  CheckError()

END SUB

' *******************************************************************
' Retrieve the DNS server name.

SUB GetDnsName()

  DIM DnsName
  DnsName = config_manager.ServerMachineDomainName
  CheckError()

END SUB


' *******************************************************************
' Error checking function.

FUNCTION CheckError()
  CheckError = Err.number
  IF Err.number <> 0 THEN
    CALL WScript.Echo( vbTab & "*****Error Number: " _
                       & Err.number _
                       & " Desc:" _
                       & Err.Description _
                       & "*****")
    WScript.StdErr.Write(Err.Description)
    WScript.Quit( Err.number )
  END IF
END FUNCTION

' *******************************************************************
' Generate a runtime error.

SUB RaiseError(errId, desc)
  CALL Err.Raise( errId, "", desc )
  CheckError()
END SUB

Requirements

Product

Requires Windows ServerĀ 2008.

Library

Use Microsoft.RightsManagementServices.Admin.dll registered as a custom type library.

See Also

ConfigurationManager

Send comments about this topic to Microsoft

Build date: 7/2/2007