AuditReport.ExportUserRequestTypeList method

The ExportUserRequestTypeList method generates a report for a given request type and user.

Syntax

AuditReport.ExportUserRequestTypeList( _
  ByVal languageId, _
  ByVal start, _
  ByVal end, _
  ByVal userDomain, _
  ByVal userName, _
  ByVal requestTypeId, _
  ByVal filePath, _
  ByVal fileType _
)

Parameters

languageId

An integer that contains the locale ID (LCID) of the report language. For example, the LCID for U.S. English is 1033. For a complete list of the LCIDs supported by Microsoft, see List of Locale ID (LCID) Values as Assigned by Microsoft.

start

A DateTime value that contains the beginning time for the report.

end

A DateTime value that contains the ending time for the report.

userDomain

A String value that contains the user domain name.

userName

A String value that contains the name of the requesting user. This cannot be an empty string.

requestTypeId

An integer value that specifies the type of request. This can be one of the following values.

0

Activate the user through a proxy.

1

Find service locations for a service type.

2

Find service locations for an authenticated user.

3

Certify the user.

4

Precertify the user by creating a rights account certificate before the user can consume protected content.

5

Retrieve the client licensor certificate.

6

Edit the issuance license.

7

Sign the issuance license.

8

Acquire a license.

9

Acquire a prelicense by creating an end user license before the user can consume protected content.

10

Acquire the key used to encrypt content.

11

Retrieve the licensor certificate.

12

Determine whether the principal is a member of the given group.

13

Retrieve issuance license template information.

14

Retrieve the issuance license templates.

filePath

A String value that contains the report file path.

fileType

An integer that contains the export file type. This can be one of the following values.

0

Microsoft Excel (.xls) file.

2

Portable Document Format (PDF) file.

Return value

This method returns a Boolean value. True specifies that a report was generated. False specifies that no report could be generated for the given input.

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

' *******************************************************************
' Generate a UserRequestTypeList report.
'
' Variables:
'    auditReport - AuditReport object
'    lcid        - 1033 is the U.S. English LCID
'    endDate     - Today's date
'    startDate   - Ten days prior to the end date
'    domainName  - Domain name for the report
'    userName    - User name
'    requestId   - Eight (8) represents an acquire license request
'    outFile     - Output file path
'    fileType    - Zero (0) represents an Excel (.xls) file

SUB CreateReport()

  DIM auditReport
  DIM lcid
  DIM endDate
  DIM startDate
  DIM domainName
  DIM userName
  DIM requestId
  DIM outFile
  DIM fileType

  lcid = 1033
  endDate = Now
  startDate = DateAdd("d", -10, endDate)
  domainName = "example.com"
  userName = "someone"
  requestId = 8
  outFile = "c:\UserRequestTypeList.xls"
  fileType = 0

  ' Create an AuditReport object.
  SET auditReport = _
          config_manager.AuditReport
  CheckError()

  ' Generate the report.
  CALL auditReport.ExportUserRequestTypeList( _
      lcid, _ 
      startDate, _ 
      endDate, _ 
      domainName, _
      userName, _
      requestId, _
      outFile, _ 
      fileType)
  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

AuditReport