Package com.sun.jna.platform.win32
Class Netapi32Util
java.lang.Object
com.sun.jna.platform.win32.Netapi32Util
Netapi32 Utility API.
- Author:
- dblock[at]dblock.org
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classA domain controller.static classA domain trust relationship.static classA group.static classA local group.static classA user.static class
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic Netapi32Util.Group[]Get local groups of the current user.getDC()Return the domain controller for a current computer.static StringReturns the name of the primary domain controller (PDC) on the current computer.static StringReturns the name of the primary domain controller (PDC).static StringgetDomainName(String computerName) Get information about a computer.static Netapi32Util.DomainTrust[]Retrieve all domain trusts.static Netapi32Util.DomainTrust[]getDomainTrusts(String serverName) Retrieve all domain trusts for a given server.static Netapi32Util.Group[]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 intReturn the domain/workgroup join status for a computer.static intgetJoinStatus(String computerName) Return the domain/workgroup join status for a computer.static Netapi32Util.LocalGroup[]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.UserInfogetUserInfo(String accountName) static Netapi32Util.UserInfogetUserInfo(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[]Get the names of users on a computer.
- 
Constructor Details- 
Netapi32Utilpublic Netapi32Util()
 
- 
- 
Method Details- 
getDCNameReturns the name of the primary domain controller (PDC) on the current computer.- Returns:
- The name of the primary domain controller.
 
- 
getDCNameReturns the name of the primary domain controller (PDC).- Parameters:
- 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.
- Returns:
- Name of the primary domain controller.
 
- 
getJoinStatuspublic static int getJoinStatus()Return the domain/workgroup join status for a computer.- Returns:
- Join status.
 
- 
getJoinStatusReturn the domain/workgroup join status for a computer.- Parameters:
- computerName- Computer name.
- Returns:
- Join status.
 
- 
getDomainNameGet information about a computer.- Parameters:
- computerName- computer name
- Returns:
- Domain or workgroup name.
 
- 
getLocalGroupsGet the names of local groups on the current computer.- Returns:
- An array of local group names.
 
- 
getLocalGroupsGet the names of local groups on a computer.- Parameters:
- serverName- Name of the computer.
- Returns:
- An array of local group names.
 
- 
getGlobalGroupsGet the names of global groups on a computer.- Returns:
- An array of group names.
 
- 
getGlobalGroupsGet the names of global groups on a computer.- Parameters:
- serverName- Name of the computer.
- Returns:
- An array of group names.
 
- 
getUsersGet the names of users on a local computer.- Returns:
- Users.
 
- 
getUsersGet the names of users on a computer.- Parameters:
- serverName- Name of the computer.
- Returns:
- An array of users.
 
- 
getCurrentUserLocalGroupsGet local groups of the current user.- Returns:
- Local groups.
 
- 
getUserLocalGroupsGet local groups of a given user.- Parameters:
- userName- User name.
- Returns:
- Local groups.
 
- 
getUserLocalGroupsGet local groups of a given user on a given system.- Parameters:
- userName- User name.
- serverName- Server name.
- Returns:
- Local groups.
 
- 
getUserGroupsGet groups of a given user.- Parameters:
- userName- User name.
- Returns:
- Groups.
 
- 
getUserGroupsGet groups of a given user on a given system.- Parameters:
- userName- User name.
- serverName- Server name.
- Returns:
- Groups.
 
- 
getDCReturn the domain controller for a current computer.- Returns:
- Domain controller information.
 
- 
getDomainTrustsRetrieve all domain trusts.- Returns:
- An array of domain trusts.
 
- 
getDomainTrustsRetrieve all domain trusts for a given server.- Parameters:
- serverName- Server name.
- Returns:
- An array of domain trusts.
 
- 
getUserInfo
- 
getUserInfo
 
-