Creating a Role to Manage Local Resources

Set RoleObj = Con.Create("role", "NewRole")
'Create a new 'Role' named "NewRole". Roles have class type "role".

' Add following tasks in the newly created role

  '1. 'CanStartService'

  '2. CanManagePrinterDocuments

  '3. CanCreateFile

RoleObj.AddTask ("CanStartService")

'Add task for rights to start a service

RoleObj.AddTask ("CanManagePrinterDocuments")

'Add task for rights to perform administrative tasks on the print job operations

RoleObj.AddTask ("CanCreateFile")

'Add task for rights to Create file share

RoleObj.SetInfo

'To commit the changes to directory

Set RoleObj = Nothing

'releasing the object

End Sub

 

See Also