22description : >
33 This article explains how to use your profile to save preferred PowerShell settings and optimize
44 your shell experience.
5- ms.date : 02/26 /2025
5+ ms.date : 11/21 /2025
66title : Customizing your shell environment
77---
88# Customizing your shell environment
@@ -22,7 +22,7 @@ on your system.
2222> [ !NOTE]
2323> To run scripts in Windows, the PowerShell execution policy needs to be set to ` RemoteSigned ` at a
2424> minimum. Execution policies don't apply to macOS and Linux. For more information, see
25- > [ about_Execution_Policy] [ 1 ] .
25+ > [ about_Execution_Policy] [ 03 ] .
2626
2727## The $PROFILE variable
2828
@@ -73,7 +73,7 @@ Console Host on Windows or the default terminal application on other platforms i
7373` Microsoft.PowerShell_profile.ps1 ` . For Visual Studio Code (VS Code), the filename is
7474` Microsoft.VSCode_profile.ps1 ` .
7575
76- For more information, see [ about_Profiles] [ 2 ] .
76+ For more information, see [ about_Profiles] [ 05 ] .
7777
7878## How to create your personal profile
7979
@@ -93,14 +93,14 @@ environment.
9393
9494## Adding customizations to your profile
9595
96- The previous articles talked about using [ tab completion] [ 3 ] , [ command predictors] [ 4 ] , and
97- [ aliases] [ 5 ] . These articles showed the commands used to load the required modules, create custom
98- completers, define key bindings, and other settings. These are the kinds of customizations that you
99- want to have available in every PowerShell interactive session. The profile script is the place for
100- these settings.
96+ The previous articles talked about using [ tab completion] [ 09 ] , [ command predictors] [ 11 ] , and
97+ [ aliases] [ 10 ] . These articles showed the commands used to load the required modules, create custom
98+ completers, define key bindings, and other settings. These customizations are the kind that you want
99+ to have available in every PowerShell interactive session. The profile script is the place for these
100+ settings.
101101
102102The simplest way to edit your profile script is to open the file in your favorite code editor. For
103- example, the following command opens the profile in [ VS Code] [ 6 ] .
103+ example, the following command opens the profile in [ VS Code] [ 08 ] .
104104
105105``` powershell
106106code $PROFILE
@@ -177,24 +177,23 @@ Register-ArgumentCompleter -Native -CommandName dotnet -ScriptBlock $scriptblock
177177
178178This profile script provides examples for the following customization:
179179
180- - Adds two new [ PSDrives] [ 7 ] for the other root registry hives.
181- - Creates a [ customized prompt] [ 8 ] that changes if you're running in an elevated session.
182- - Configures ** PSReadLine** and adds key binding. The color settings use the [ $PSStyle] [ 9 ] feature
180+ - Adds two new [ PSDrives] [ 04 ] for the other root registry hives.
181+ - Creates a [ customized prompt] [ 06 ] that changes if you're running in an elevated session.
182+ - Configures ** PSReadLine** and adds key binding. The color settings use the [ $PSStyle] [ 02 ] feature
183183 to define the ANSI color settings.
184- - Adds tab completion for the [ dotnet CLI] [ 10 ] tool. The tool provides parameters to help resolve
185- the command-line arguments. The script block for [ Register-ArgumentCompleter] [ 11 ] uses that
184+ - Adds tab completion for the [ dotnet CLI] [ 01 ] tool. The tool provides parameters to help resolve
185+ the command-line arguments. The script block for [ Register-ArgumentCompleter] [ 07 ] uses that
186186 feature to provide the tab completion.
187187
188188<!-- link references -->
189-
190- [ 1 ] : /powershell/module/microsoft.powershell.core/about/about_execution_policies
191- [ 2 ] : /powershell/module/microsoft.powershell.core/about/about_profiles
192- [ 3 ] : tab-completion.md
193- [ 4 ] : using-predictors.md
194- [ 5 ] : using-aliases.md
195- [ 6 ] : https://code.visualstudio.com/
196- [ 7 ] : /powershell/module/microsoft.powershell.core/about/about_filesystem_provider
197- [ 8 ] : /powershell/module/microsoft.powershell.core/about/about_prompts
198- [ 9 ] : /powershell/module/microsoft.powershell.core/about/about_ansi_terminals
199- [ 10 ] : /dotnet/core/tools/
200- [ 11 ] : /powershell/module/microsoft.powershell.core/register-argumentcompleter
189+ [ 01 ] : /dotnet/core/tools/
190+ [ 02 ] : /powershell/module/microsoft.powershell.core/about/about_ansi_terminals
191+ [ 03 ] : /powershell/module/microsoft.powershell.core/about/about_execution_policies
192+ [ 04 ] : /powershell/module/microsoft.powershell.core/about/about_filesystem_provider
193+ [ 05 ] : /powershell/module/microsoft.powershell.core/about/about_profiles
194+ [ 06 ] : /powershell/module/microsoft.powershell.core/about/about_prompts
195+ [ 07 ] : /powershell/module/microsoft.powershell.core/register-argumentcompleter
196+ [ 08 ] : https://code.visualstudio.com/
197+ [ 09 ] : tab-completion.md
198+ [ 10 ] : using-aliases.md
199+ [ 11 ] : using-predictors.md
0 commit comments