User Folder Variable
I'm trying to find out if there is a user folder variable for scripting.
I found the below list, but I'm not seeing any reference to a user folder.
Well, if you use Scripting, the default user which is used is SYSTEM. And SYSTEM does not have a user folder.
So you have to use the Windows-Variable which only works if you run the script as "logged in user" or as a determined user and then it links to their local user folders
What is your end goal?
The environmental variable for a users directory in windows is %userprofile% or $env:userprofile in powershell, but as Nico stated this wont have the desired effect if you're running the script as "system".
You can configure scripts to run as a "logged in user" but there are some nuances to doing that.
Depending what you're trying to do I probably have a code snippet or two I could share.