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
- To create a new “Current user, Windows PowerShell ISE” profile, type:
if (!(test-path $profile )) {new-item -type file -path $profile -force}
- To create a new “All users, Windows PowerShell ISE” profile, type:
if (!(test-path $profile.AllUsersCurrentHost)) {new-item -type file -path $profile.AllUsersCurrentHost -force}
- To create a new “Current user, All Hosts” profile, type:
if (!(test-path $profile.CurrentUserAllHosts)) {new-item -type file -path $profile.CurrentUserAllHosts -force}
- 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
-
Open the profile. For example, to open the Current user, Windows PowerShell ISE profile, type:
psEdit $profile
-
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 ISE Scripting Object Model. - To change font size to 20, in the profile file type:
$psISE.Options.FontSize =20
- To change the default background color of the Output Pane to blue, in the profile file type:
-
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