Search code examples
environment-variablesenvironment

How to get windows login name


How can I get windows login name? I need to print to db 'machine name' ( ${__machineName} ) and 'user name'. Is there a way to get current user name?

Thanks,


Solution

  • OK, so I found a way to do it.

    I added JSR223 with the Java language and printed the following command:

    log.info(System.getProperty("user.name"))