In addition to managing users, groups, domain level properties, and system services, you can also harness the power of ADSI to manipulate file and print resources on machines throughout your enterprise. Using the IADsFileService, IADsFileServiceOperations, and IADsFileShare interfaces, you can enumerate and manage existing shares on a particular machine, or combine these interfaces with the IADsContainer interface to create a new file share. After a share is created, you can view and manage the sessions that are associated with each open resource. By loading the contents of the dynamic IADsSession interface into a collection (using ADSI's IADsCollection interface) you can programmatically view and remove user sessions connected to each file share. ADSI's IADsPrintQueue and IADsPrintQueueOperations interfaces allow you to enumerate and manage established print queues. To view and manage the print jobs within a queue, you can use the IADsPrintJob and IADsPrintJobOperations interfaces. By using these interfaces and the code in this chapter, you can create administrative applications for managing the following:
Finally, in this chapter you will continue the creation of the NTAdmin.DLL COM server application started in Chapter 3, "Container Enumeration Methods and Programmatic Domain Account Policy Manipulation." |
Top |