Your question needs context to explain what you want and how you are intending on getting it. Environment variables are created per session, so there has to be a (user) session to get environment variable data. If I am logged in and you run a script remotely on my system, $env: is the environment of WHO is running the script, not another user that is logged on to the system.
You can use WMI to get domain information, but the user's domain and the computer's domain may not be the same. This makes it confusing as to what you are looking for. A more common WMI call would be: