PowerTip: Use PowerShell to Show Path to All Your Profiles

Summary: Use Windows PowerShell to show the path to all your Windows PowerShell profiles.

Hey, Scripting Guy! Question How can I use Windows PowerShell to see the path to all of my Windows PowerShell profiles—
          not only the current host or current user profile?

Hey, Scripting Guy! Answer Use the $profile automatic variable, pipe the results to the Format-List cmdlet,
          and then use the –force parameter to force it to show all paths:

$PROFILE | Format-List -Force

Comments (4)

  1. Chen V says:

    Can be used as required

  2. JVimes says:

    It’s strange that -Force is necessary. The help for that parameter says: PS C:> Get-Help Format-List -Parameter Force -Force [] Directs the cmdlet to display all of the error information. Use with the DisplayError or ShowError parameters. By default,
    when an error object is written to the error or display streams, only some of the error information is displayed. Are the extra paths being treated as "error information" (and if so, why)? Or is this help is incomplete, I wonder.

  3. JVimes says:

    (Hmm… the blog platform removed my carriage returns and has no edit option. Sorry for the mash of text up there.)

  4. Joe says:

    Can also use $profile | select * to find all the profile path.

Skip to main content