Session Enumeration With NetSessionEnum API

How to take advantage of the NetSessionEnum API to determine remotely logged in users.