ExcludedLockbox.Enabled property
The Enabled property specifies or retrieves a Boolean value that indicates whether lockbox exclusion is enabled.
Syntax
ExcludedLockbox.Enabled
Property value
This property specifies or returns a Boolean value. If this value is False, exclusion is not enabled.
Remarks
Lockbox exclusion prohibits AD RMS from issuing an end-user license, certificate, or client licensor certificate if the minimum version of the lockbox installed on the client is less than the version specified and lockbox exclusion has been enabled.
Exclusion must be enabled before you can set or retrieve the LockboxMinimumVersion property value.
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 |
|