Chapter 7. Programmatic File and Print Resource Management

   


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:

  • File resources

  • File sessions

  • Open resources

  • Printing resources

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


Windows NT. 2000 ADSI Scripting for System Administration
Windows NT/2000 ADSI Scripting for System Administration
ISBN: 1578702194
EAN: 2147483647
Year: 2000
Pages: 194
Authors: Thomas Eck

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net