ExcludedLockbox object

The ExcludedLockbox object identifies the minimum lockbox version that must be installed on the client before a use license can be granted. When you enable this feature and specify a minimum version, clients that are using a version of the lockbox that precedes the specified version cannot acquire rights account certificates or use licenses. You can retrieve this object by calling the Lockbox property on the ExclusionPolicy object.

Members

The ExcludedLockbox object has these types of members:

Properties

The ExcludedLockbox object has these properties.

Property Description
Enabled
Specifies or retrieves a Boolean value that indicates whether lockbox exclusion is enabled.
LockboxMinimumVersion
Specifies or retrieves the minimum lockbox version that must be installed before licenses and certificates can be issued.

Examples

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

' *******************************************************************
' Exclude lockboxes.

SUB ExcludeLockbox()

  DIM exclusionPolicy
  DIM lockbox
  DIM minVersion

  ' Retrieve the ExclusionPolicy object.
  SET exclusionPolicy = config_manager.Enterprise.ExclusionPolicy
  CheckError()

  ' Retrieve the ExcludedLockbox object.
  SET lockbox = exclusionPolicy.Lockbox
  CheckError()

  IF IsObject(lockbox) <> TRUE THEN
    CALL RaiseError(-870, "Failed to retrieve ExcludedLockbox")
  END IF

  ' Enable lockbox exclusion.
  lockbox.Enabled = TRUE
  CheckError()

  ' Create a Version object.
  SET minVersion = CreateObject( _
    "Microsoft.RightsManagementServices.Admin.Version")

  ' Set the minimum version to 5.0.0.0.
  minVersion.Major = 5
  minVersion.Minor = 0
  minVersion.Build = 0
  minVersion.Revision = 0

  lockbox.LockboxMinimumVersion = minVersion

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

Active Directory Rights Management Services Scripting API Reference