public abstract class Netapi32Util extends Object
| Modifier and Type | Class and Description | 
|---|---|
| static class  | Netapi32Util.DomainControllerA domain controller. | 
| static class  | Netapi32Util.DomainTrustA domain trust relationship. | 
| static class  | Netapi32Util.GroupA group. | 
| static class  | Netapi32Util.LocalGroupA local group. | 
| static class  | Netapi32Util.UserA user. | 
| static class  | Netapi32Util.UserInfo | 
| Constructor and Description | 
|---|
| Netapi32Util() | 
| Modifier and Type | Method and Description | 
|---|---|
| static Netapi32Util.Group[] | getCurrentUserLocalGroups()Get local groups of the current user. | 
| static Netapi32Util.DomainController | getDC()Return the domain controller for a current computer. | 
| static String | getDCName()Returns the name of the primary domain controller (PDC) on the current computer. | 
| static String | getDCName(String serverName,
         String domainName)Returns the name of the primary domain controller (PDC). | 
| static String | getDomainName(String computerName)Get information about a computer. | 
| static Netapi32Util.DomainTrust[] | getDomainTrusts()Retrieve all domain trusts. | 
| static Netapi32Util.DomainTrust[] | getDomainTrusts(String serverName)Retrieve all domain trusts for a given server. | 
| static Netapi32Util.Group[] | getGlobalGroups()Get the names of global groups on a computer. | 
| static Netapi32Util.Group[] | getGlobalGroups(String serverName)Get the names of global groups on a computer. | 
| static int | getJoinStatus()Return the domain/workgroup join status for a computer. | 
| static int | getJoinStatus(String computerName)Return the domain/workgroup join status for a computer. | 
| static Netapi32Util.LocalGroup[] | getLocalGroups()Get the names of local groups on the current computer. | 
| static Netapi32Util.LocalGroup[] | getLocalGroups(String serverName)Get the names of local groups on a computer. | 
| static Netapi32Util.Group[] | getUserGroups(String userName)Get groups of a given user. | 
| static Netapi32Util.Group[] | getUserGroups(String userName,
             String serverName)Get groups of a given user on a given system. | 
| static Netapi32Util.UserInfo | getUserInfo(String accountName) | 
| static Netapi32Util.UserInfo | getUserInfo(String accountName,
           String domainName) | 
| static Netapi32Util.Group[] | getUserLocalGroups(String userName)Get local groups of a given user. | 
| static Netapi32Util.Group[] | getUserLocalGroups(String userName,
                  String serverName)Get local groups of a given user on a given system. | 
| static Netapi32Util.User[] | getUsers()Get the names of users on a local computer. | 
| static Netapi32Util.User[] | getUsers(String serverName)Get the names of users on a computer. | 
public static String getDCName()
public static String getDCName(String serverName, String domainName)
serverName - Specifies the DNS or NetBIOS name of the remote server on which the function is 
        to execute.domainName - Specifies the name of the domain.public static int getJoinStatus()
public static int getJoinStatus(String computerName)
computerName - Computer name.public static String getDomainName(String computerName)
computerName - computer namepublic static Netapi32Util.LocalGroup[] getLocalGroups()
public static Netapi32Util.LocalGroup[] getLocalGroups(String serverName)
serverName - Name of the computer.public static Netapi32Util.Group[] getGlobalGroups()
public static Netapi32Util.Group[] getGlobalGroups(String serverName)
serverName - Name of the computer.public static Netapi32Util.User[] getUsers()
public static Netapi32Util.User[] getUsers(String serverName)
serverName - Name of the computer.public static Netapi32Util.Group[] getCurrentUserLocalGroups()
public static Netapi32Util.Group[] getUserLocalGroups(String userName)
userName - User name.public static Netapi32Util.Group[] getUserLocalGroups(String userName, String serverName)
userName - User name.serverName - Server name.public static Netapi32Util.Group[] getUserGroups(String userName)
userName - User name.public static Netapi32Util.Group[] getUserGroups(String userName, String serverName)
userName - User name.serverName - Server name.public static Netapi32Util.DomainController getDC()
public static Netapi32Util.DomainTrust[] getDomainTrusts()
public static Netapi32Util.DomainTrust[] getDomainTrusts(String serverName)
serverName - Server name.public static Netapi32Util.UserInfo getUserInfo(String accountName)
public static Netapi32Util.UserInfo getUserInfo(String accountName, String domainName)