Please note that there is a known memory leak issue caused by MS. Read this KB
article: KB893317
I assume the user is familiar with WMI and has already set up his/her machine to compile WMI projects. if not, then check Set Up Delphi For WMI
List all users on the local machine using WMI in Delphi (can be modified to be used on remote machines as well)
Source Code