PowerTip: Use PowerShell to Find User Profile Path

Summary: Use Windows PowerShell to find the user profile path.

Hey, Scripting Guy! Question How can I easily get information about the folder and path to the profile for a currently signed-in user?

Hey, Scripting Guy! Answer Use the Env: PowerShell drive, and select the UserProfile environmental variable:


Comments (1)

  1. Zrider1 says:

    Thank you!

    I was trying to use ‘UserName’ (Like I had in the past), and it just appended my domain logon name to the path to my Desktop.


    Like many organizations these days, your Logon Name and Profile/User name may be different.

    Like: first.last and flastxyz123
    Using ‘$Env:userprofile’ gives the actual path to the desktop on the computer you are logged into.


    In my case I created a variable to dump a report file to my desktop every morning.
    $Destination = "$Env:userprofileDesktop"

Skip to main content