How to Use Profiles in Windows PowerShell ISE

Use the following topics to learn how to use profiles in the Windows PowerShell Integrated Scripting Environment (ISE).

Note:

Before performing the tasks in this section, see about_Profiles, or in the Command Pane, type, “get-help about_profiles” and press ENTER.

You can create one or more Windows PowerShell profiles for Windows PowerShell ISE and use them to add the variables, aliases, commands and functions that you use frequently. A profile affects every Windows PowerShell ISE session that you start. You can also use a profile to preserve the items that you customize in the Windows PowerShell ISE environment, such as color and font preferences.

Note:

The Windows PowerShell execution policy determines whether you can run scripts and load a profile or a configuration files. The default execution policy, “Restricted,” prevents all scripts from running, including profiles. If you use the “Restricted” policy, the profile does not load. For more information about execution policy, see about_Execution_Policies.

Selecting a Profile to Use in Windows PowerShell ISE

Windows PowerShell ISE supports profiles for the current user and all users of Windows PowerShell ISE. It also supports the Windows PowerShell profiles that apply to all hosts.

The profile that you use is determined by how you use Windows PowerShell and Windows PowerShell ISE.

  • If you use only Windows PowerShell ISE to run Windows PowerShell, then save all your items in one of the ISE-specific profiles, such as the CurrentUserCurrentHost profile for Windows PowerShell ISE or the AllUsersCurrentHost profile for Windows PowerShell ISE.

  • If you use multiple host programs to run Windows PowerShell, save your functions, aliases, variables, and commands in a profile that affects all host programs, such as the CurrentUserAllHosts or the AllUsersAllHosts profile, and save ISE-specific features, like color and font customization in the CurrentUserCurrentHost profile for Windows PowerShell ISE profile or the AllUsersCurrentHost profile for Windows PowerShell ISE.

The following are profiles that can be created and used in Windows PowerShell ISE. Each profile is saved to its own specific path.

Profile Type Profile Path

“Current user, PowerShell ISE”

$profile.CurrentUserCurrentHost, or $profile

“All users, PowerShell ISE”

$profile.AllUsersCurrentHost

“Current user, All hosts”

$profile.CurrentUserAllHosts

“All users, All hosts”

$profile.AllUsersAllHosts

In this section

How to Create Profiles in Windows PowerShell ISE
Provides the procedures to create, move, and save profiles in the Windows PowerShell ISE.

See Also