![]() ![]() When you customize the ServiceProgrammaticName entry, make sure you use the service's programmatic name and not its display name. To use this code, you need to customize the TargetDomain, TargetComputer, and ServiceProgrammaticName entries in the ADsPath that VBScript's GetObject function uses to bind to the service. If you know the ADsPath for the service to which you want to bind, you can use the direct binding method, which Listing 2 shows. Then, you enumerate each service and query whether a domain account has been assigned to the IADsService::ServiceAccountName property. First, you enumerate the namespace ("WinNT://TargetDomain", where TargetDomain is your domain's name) and establish bindings to each computer in the domain. As Listing 1 shows, you enumerate a Windows NT domain to determine the accounts that support various enterprise services. Like many ADSI code segments, the code to find services with domain accounts begins with an enumeration function. ![]()
0 Comments
Leave a Reply. |