Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Find Name and Location of PowerShell Profiles

$
0
0

Summary: Learn how to find the name and location of various Windows PowerShell profiles.

Hey, Scripting Guy! Question How can I find the name and location of various Windows PowerShell profiles?

Hey, Scripting Guy! Answer Use the $profile automatic variable to see what profiles are available for your particular Windows PowerShell
           host (for example, the console host or the ISE). To find only the name and the location of the profiles,
           you need to return only the properties from the object and then look for names that  begin with A or C,
           for example:

(($PROFILE).psobject.Properties).where({$_.name -match 'a|c'}) | select name, value


Viewing all articles
Browse latest Browse all 3333

Trending Articles