This category includes the following APIs:
Server - NetGetDCName
Server - NetServerAdminCommand
Server - NetServerDiskEnum
Server - NetServerEnum2
Server - NetServerGetInfo
Server - NetServerSetInfo
Server APIs enable most applications to perform remote administration tasks on either a local or remote server. Server APIs are used with the ACCESS.H, SERVER.H, and NETCONS.H header files.
Any user or application assigned Administrator authority on a local or remote server can perform administrative tasks on that server. Those tasks include controlling its operation, user access, and resource sharing. A user can be given administrative privilege with the NetUserAdd and NetUserSetInfo APIs (see User Category), or the NetShareAdd and NetShareSetInfo APIs (see Share Category).
Certain low-level parameters that affect the operation of a server can be examined and changed by calling the NetServerGetInfo and NetServerSetInfo APIs. These parameters are defined in the IBMLAN.INI file of the server.
Other changes in the operation of a server require the execution of one of the NET commands, such as NET USE or NET SHARE. To run a NET command on a server, an application calls the NetServerAdminCommand function. This function also accepts any OS/2 command for execution on the server.
To obtain a list of servers available to perform remote administration, an application calls the NetServerEnum2 function. This function enumerates the set of all servers visible on the network. The type of NetServerEnum2 matches the bit mask in the field. To obtain a list of local drives, an application calls the NetServerDiskEnum function.