How to Create Profiles in Windows PowerShell ISE

Applies To: Windows PowerShell 2.0

Before you create a profile, you must know what type of profile you want to create. For more information, see about_Profiles, or in the Command Pane, type, “get-help about_profiles” and press ENTER.

To create a new profile

  1. To create a new “Current user, Windows PowerShell ISE” profile, type:

    if (!(test-path $profile )) 
    {new-item -type file -path $profile -force} 
    
  2. To create a new “All users, Windows PowerShell ISE” profile, type:

    if (!(test-path $profile.AllUsersCurrentHost)) 
    {new-item -type file -path $profile.AllUsersCurrentHost -force}
    
  3. To create a new “Current user, All Hosts” profile, type:

    if (!(test-path $profile.CurrentUserAllHosts)) 
    {new-item -type file -path $profile.CurrentUserAllHosts -force}
    
  4. To create a new “All users, All Hosts” profile, type:

    if (!(test-path $profile.AllUsersAllHosts)) 
    {new-item -type file -path $profile.AllUsersAllHosts-force} 
    

To edit a profile

  1. Open the profile. For example, to open the Current user, Windows PowerShell ISE profile, type: psEdit $profile

  2. Add some items to your profile. The following are a few examples to get you started:

    • To change the default background color of the Output Pane to blue, in the profile file type: $psISE.Options.OutputPaneBackground = 'blue' . For more information about the $psISE variable, see The Windows PowerShell 2.0 ISE Scripting Object Model.

    • To change font size to 20, in the profile file type: $psISE.Options.FontSize =20

  3. Save your profile file. On the File menu, click Save. Next time you open the Windows PowerShell ISE, your customizations will be applied.

See Also

Other Resources

How to Use Profiles in Windows PowerShell ISE
The Windows PowerShell 2.0 ISE Scripting Object Model
about_Profiles
about_Signing [m2]
Set-ExecutionPolicy [m2]