How do I get the current username in Windows PowerShell?
I'd like to throw in the whoami command, which basically is a nice alias for doing %USERDOMAIN%\%USERNAME% as proposed in other answers.
%USERDOMAIN%\%USERNAME%
Write-Host "current user:" Write-Host $(whoami)