hey guys, how's everyone doing?
I'm exploring possibilities with scripts in atera and would like recommendations for working with environment variables.
In my tests I noticed that the script submission occurs through a powershell session with different values than the real user.
Values like $env:USERNAME may not exactly match the actual user of the machine.
My context of use is to subscribe to TeamViewer groups for example, cost to subscribe to the devices by getting the user/device name.
Exemple: My real value when I run whoami is AzureAD\MarcosSantos
'''
$userlocal = whoami
Write-Host $userlocal
'''