How to get the current username in PowerShell? There are multiple ways you can get your current username in PowerShell. The easiest way is to get from PowerShell environment variable using $env:UserName Default ## Get current user name echo $env:UserName 12 ## Get current user nameecho $env:UserName Tags: FAQ, PowerShell Leave a Reply Cancel replyYou must be logged in to post a comment.