Starting a Service in Active Directory

'Below path "NTDSloc://Domain1/ComputerA/Service1" identifies service.
Dim ServiceObj As IADsServiceOperations

Dim AdsObj As IADs

Set ServiceObj = GetObject("NTDSloc://Domain1/ComputerA/Service1/server=DMSserver01")

Set AdsObj = ServiceObj

' IADs interface provides the following four properties

'Note: You will have to put these properties for LRD in WIN2K

AdsObj.Put "DA_DRole_Server_Name", "DCDomain1"
'specify name of the DC for WIN2K domain

AdsObj.Put "DA_User_Name", "Domain1\Charlie" '

'Name of the User connected to the AD tree

AdsObj.Put "DA_Password", "pwd"

'Password of the User

AdsObj.Put "DA_Use_Role_Type", 2

'Specifies the AD roles

'Start the service

ServiceObj.Start

'Release the Object

Set ServiceObj = Nothing