PowerTip: Pick Up User Name with PowerShell

Doctor Scripto

Summary: Use Windows PowerShell to easily pick up the user name.

Hey, Scripting Guy! Question How can I easily pick up the user name from my Windows PowerShell script?

Hey, Scripting Guy! Answer Use the USERNAME environmental variable, and pick it up from the $env Windows PowerShell drive:



Discussion is closed.

Feedback usabilla icon