Поделиться через


ConfigurationManager.Enterprise property

The Enterprise property retrieves an Enterprise object that can be used for enterprise administration.

This property is read-only.

Syntax

ConfigurationManager.Enterprise

Property value

This property returns an Enterprise object. The property is read-only.

Remarks

The Enterprise object is created when the Initialize method is called if the access control list on the AD RMS Administration website supports the Administrator (0x4) role.

Examples

DIM config_manager
DIM admin_role
DIM enterprise_manager
DIM database_info

' *******************************************************************
' 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 an Enterprise object and the associated database.

SUB GetEnterpriseDataBase()

  SET enterprise_manager = config_manager.Enterprise
  CheckError()

  SET database_info = enterprise_manager.EnterpriseDatabase
  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

Minimum supported client
None supported
Minimum supported server
Windows Server 2008
Assembly
Microsoft.RightsManagementServices.Admin.dll

See also

ConfigurationManager