Working with Users

Although the Windows Home Server API does not provide a way to directly enumerate user accounts that are on Windows Home Server, you can use the Windows Server 2003 API to retrieve a list of user accounts and then include that information in your custom application.

Enumerating Windows Home Server User Accounts

To enumerate user accounts on the Windows Home Server, you can use the NetLocalGroupGetMembers method from the Win32 API.

For example, you may want to list all of the user accounts that are on Windows Home Server, or you may want to only retrieve a list of user accounts that have Remote Access rights to Windows Home Server.

To do this, pass the name of the local group that contains the user accounts that you want to enumerate as one of the parameters to the NetLocalGroupGetMembers function call. For the examples just mentioned, pass in the local group name Windows Home Server Users to retrieve a list of all of the user accounts on Windows Home Server, and pass in Remote Desktop Users to retrieve a list of the user accounts that have Remote Access rights to Windows Home Server.

For more information about how to use the NetLocalGroupGetMembers function, see the Microsoft Web site.

See Also

Concepts

Extending Windows Home Server
Working with WHSInfoClass
Working with Client Computers
Working with Application Folders
Working with Managed Volumes
Working with Hard Disks
Working with Notifications
Working with Backups

Other Resources

Working with Shared Folders