Skip to content

Commit

Permalink
Clarify that the profile location values are the default values and c…
Browse files Browse the repository at this point in the history
…an be changed
  • Loading branch information
sdwheeler committed Mar 18, 2024
1 parent 8e00458 commit 0956aa9
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 39 deletions.
22 changes: 11 additions & 11 deletions reference/5.1/Microsoft.PowerShell.Core/About/about_Profiles.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes how to create and use a PowerShell profile.
Locale: en-US
ms.date: 02/26/2024
ms.date: 03/18/2024
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about Profiles
Expand Down Expand Up @@ -30,15 +30,23 @@ doesn't create the profiles for you.
PowerShell supports several profile files that are scoped to users and
PowerShell hosts. You can have any or all these profiles on your computer.

For example, the PowerShell console supports the following basic profile files.
The profiles are listed in order that they're executed.
The PowerShell console supports the following basic profile files. These file
paths are the default locations.

- All Users, All Hosts - `$PSHOME\Profile.ps1`
- All Users, Current Host - `$PSHOME\Microsoft.PowerShell_profile.ps1`
- Current User, All Hosts - `$HOME\Documents\WindowsPowerShell\Profile.ps1`
- Current user, Current Host -
`$HOME\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1`

> [!NOTE]
> In Windows, the location of the `Documents` folder can be changed by folder
> redirection or OneDrive. We don't recommend redirecting the `Documents`
> folder to a network share or including it in OneDrive. Redirecting the folder
> can cause modules to fail to load and create errors in your profile scripts.
> For information about removing the `Documents` folder from OneDrive
> management, consult the [OneDrive documentation](/onedrive/).
The profile scripts are executed in the order listed. This means that changes
made in the **AllUsersAllHosts** profile can be overridden by any of the other
profile scripts. The **CurrentUserCurrentHost** profile always runs last. In
Expand All @@ -58,14 +66,6 @@ The profile paths include the following variables:
- The `$PSHOME` variable stores the installation directory for PowerShell
- The `$HOME` variable stores the current user's home directory

> [!NOTE]
> In Windows, the location of the `Documents` folder can be changed by folder
> redirection or OneDrive. We don't recommend redirecting the `Documents`
> folder to a network share or including it in OneDrive. Redirecting the folder
> can cause modules to fail to load and create errors in your profile scripts.
> For information about removing the `Documents` folder from OneDrive
> management, consult the [OneDrive documentation](/onedrive/).
## The $PROFILE variable

The `$PROFILE` automatic variable stores the paths to the PowerShell profiles
Expand Down
22 changes: 11 additions & 11 deletions reference/7.2/Microsoft.PowerShell.Core/About/about_Profiles.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes how to create and use a PowerShell profile.
Locale: en-US
ms.date: 02/26/2024
ms.date: 03/18/2024
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-7.2&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about Profiles
Expand Down Expand Up @@ -30,8 +30,8 @@ doesn't create the profiles for you.
PowerShell supports several profile files that are scoped to users and
PowerShell hosts. You can have any or all these profiles on your computer.

For example, the PowerShell console supports the following basic profile files.
The profiles are listed in order that they're executed.
The PowerShell console supports the following basic profile files. These file
paths are the default locations.

- All Users, All Hosts
- Windows - `$PSHOME\Profile.ps1`
Expand All @@ -50,6 +50,14 @@ The profiles are listed in order that they're executed.
- Linux - `~/.config/powershell/Microsoft.PowerShell_profile.ps1`
- macOS - `~/.config/powershell/Microsoft.PowerShell_profile.ps1`

> [!NOTE]
> In Windows, the location of the `Documents` folder can be changed by folder
> redirection or OneDrive. We don't recommend redirecting the `Documents`
> folder to a network share or including it in OneDrive. Redirecting the folder
> can cause modules to fail to load and create errors in your profile scripts.
> For information about removing the `Documents` folder from OneDrive
> management, consult the [OneDrive documentation](/onedrive/).
The profile scripts are executed in the order listed. This means that changes
made in the **AllUsersAllHosts** profile can be overridden by any of the other
profile scripts. The **CurrentUserCurrentHost** profile always runs last. In
Expand All @@ -69,14 +77,6 @@ The profile paths include the following variables:
- The `$PSHOME` variable stores the installation directory for PowerShell
- The `$HOME` variable stores the current user's home directory

> [!NOTE]
> In Windows, the location of the `Documents` folder can be changed by folder
> redirection or OneDrive. We don't recommend redirecting the `Documents`
> folder to a network share or including it in OneDrive. Redirecting the folder
> can cause modules to fail to load and create errors in your profile scripts.
> For information about removing the `Documents` folder from OneDrive
> management, consult the [OneDrive documentation](/onedrive/).
## The $PROFILE variable

The `$PROFILE` automatic variable stores the paths to the PowerShell profiles
Expand Down
14 changes: 11 additions & 3 deletions reference/7.3/Microsoft.PowerShell.Core/About/about_Profiles.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes how to create and use a PowerShell profile.
Locale: en-US
ms.date: 02/26/2024
ms.date: 03/18/2024
online version: https://learn.microsoft.com/powershell/module/Microsoft.PowerShell.core/about/about_profiles?view=powershell-7.3&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about Profiles
Expand Down Expand Up @@ -30,8 +30,8 @@ doesn't create the profiles for you.
PowerShell supports several profile files that are scoped to users and
PowerShell hosts. You can have any or all these profiles on your computer.

For example, the PowerShell console supports the following basic profile files.
The profiles are listed in order that they're executed.
The PowerShell console supports the following basic profile files. These file
paths are the default locations.

- All Users, All Hosts
- Windows - `$PSHOME\Profile.ps1`
Expand All @@ -50,6 +50,14 @@ The profiles are listed in order that they're executed.
- Linux - `~/.config/powershell/Microsoft.PowerShell_profile.ps1`
- macOS - `~/.config/powershell/Microsoft.PowerShell_profile.ps1`

> [!NOTE]
> In Windows, the location of the `Documents` folder can be changed by folder
> redirection or OneDrive. We don't recommend redirecting the `Documents`
> folder to a network share or including it in OneDrive. Redirecting the folder
> can cause modules to fail to load and create errors in your profile scripts.
> For information about removing the `Documents` folder from OneDrive
> management, consult the [OneDrive documentation](/onedrive/).
The profile scripts are executed in the order listed. This means that changes
made in the **AllUsersAllHosts** profile can be overridden by any of the other
profile scripts. The **CurrentUserCurrentHost** profile always runs last. In
Expand Down
22 changes: 11 additions & 11 deletions reference/7.4/Microsoft.PowerShell.Core/About/about_Profiles.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes how to create and use a PowerShell profile.
Locale: en-US
ms.date: 02/26/2024
ms.date: 03/18/2024
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about Profiles
Expand Down Expand Up @@ -30,8 +30,8 @@ doesn't create the profiles for you.
PowerShell supports several profile files that are scoped to users and
PowerShell hosts. You can have any or all these profiles on your computer.

For example, the PowerShell console supports the following basic profile files.
The profiles are listed in order that they're executed.
The PowerShell console supports the following basic profile files. These file
paths are the default locations.

- All Users, All Hosts
- Windows - `$PSHOME\Profile.ps1`
Expand All @@ -50,6 +50,14 @@ The profiles are listed in order that they're executed.
- Linux - `~/.config/powershell/Microsoft.PowerShell_profile.ps1`
- macOS - `~/.config/powershell/Microsoft.PowerShell_profile.ps1`

> [!NOTE]
> In Windows, the location of the `Documents` folder can be changed by folder
> redirection or OneDrive. We don't recommend redirecting the `Documents`
> folder to a network share or including it in OneDrive. Redirecting the folder
> can cause modules to fail to load and create errors in your profile scripts.
> For information about removing the `Documents` folder from OneDrive
> management, consult the [OneDrive documentation](/onedrive/).
The profile scripts are executed in the order listed. This means that changes
made in the **AllUsersAllHosts** profile can be overridden by any of the other
profile scripts. The **CurrentUserCurrentHost** profile always runs last. In
Expand All @@ -69,14 +77,6 @@ The profile paths include the following variables:
- The `$PSHOME` variable stores the installation directory for PowerShell
- The `$HOME` variable stores the current user's home directory

> [!NOTE]
> In Windows, the location of the `Documents` folder can be changed by folder
> redirection or OneDrive. We don't recommend redirecting the `Documents`
> folder to a network share or including it in OneDrive. Redirecting the folder
> can cause modules to fail to load and create errors in your profile scripts.
> For information about removing the `Documents` folder from OneDrive
> management, consult the [OneDrive documentation](/onedrive/).
## The $PROFILE variable

The `$PROFILE` automatic variable stores the paths to the PowerShell profiles
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes how to create and use a PowerShell profile.
Locale: en-US
ms.date: 02/26/2024
ms.date: 03/18/2024
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-7.5&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about Profiles
Expand Down Expand Up @@ -30,8 +30,8 @@ doesn't create the profiles for you.
PowerShell supports several profile files that are scoped to users and
PowerShell hosts. You can have any or all these profiles on your computer.

For example, the PowerShell console supports the following basic profile files.
The profiles are listed in order that they're executed.
The PowerShell console supports the following basic profile files. These file
paths are the default locations.

- All Users, All Hosts
- Windows - `$PSHOME\Profile.ps1`
Expand Down

0 comments on commit 0956aa9

Please sign in to comment.