Should you try and use PowerShell as a log-on script, you may want to know who is actually running the script to access user specific folders or settings. The .NET Environment class can tell you who is running a script.
[Environment]::UserDomainName + "" + [Environment]::UserName
[Environment]::MachineName