From 7f3eb1cc4faa6961d1c9476d245a3f878175cb90 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Fri, 1 May 2026 10:13:11 -0500 Subject: [PATCH 1/2] Document $Profile limitations for MSIX --- .../About/about_Profiles.md | 11 ++++++++++- .../About/about_Profiles.md | 11 ++++++++++- .../About/about_Profiles.md | 11 ++++++++++- .../About/about_Profiles.md | 11 ++++++++++- .../install/install-powershell-on-windows.md | 19 +++++++++++-------- 5 files changed, 51 insertions(+), 12 deletions(-) diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Profiles.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Profiles.md index 4410f3866b28..07f59bd3b027 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Profiles.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Profiles.md @@ -1,7 +1,7 @@ --- description: Describes how to create and use a PowerShell profile. Locale: en-US -ms.date: 03/18/2024 +ms.date: 05/01/2026 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 @@ -312,6 +312,15 @@ Invoke-Command -Session $s -ScriptBlock { After running this command, the commands that the profile adds to the session are available in `$s`. +## Profiles for MSIX-based installations + +For MSIX-based installations of PowerShell, the **AllUsersAllHosts** and +**AllUsersCurrentHost** profile scripts must reside in the `$PSHOME` directory. +Because the MSIX package is installed in a read-only location, you can't create +or modify profile scripts in `$PSHOME`. Therefore, these profiles aren't +available for MSIX-based installations, and you can only create and use the +**CurrentUserAllHosts** and **CurrentUserCurrentHost** profiles. + ## See also - [about_Automatic_Variables][01] diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Profiles.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Profiles.md index ca642c88e395..129809806795 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Profiles.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Profiles.md @@ -1,7 +1,7 @@ --- description: Describes how to create and use a PowerShell profile. Locale: en-US -ms.date: 03/18/2024 +ms.date: 05/01/2026 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 @@ -312,6 +312,15 @@ Invoke-Command -Session $s -ScriptBlock { After running this command, the commands that the profile adds to the session are available in `$s`. +## Profiles for MSIX-based installations + +For MSIX-based installations of PowerShell, the **AllUsersAllHosts** and +**AllUsersCurrentHost** profile scripts must reside in the `$PSHOME` directory. +Because the MSIX package is installed in a read-only location, you can't create +or modify profile scripts in `$PSHOME`. Therefore, these profiles aren't +available for MSIX-based installations, and you can only create and use the +**CurrentUserAllHosts** and **CurrentUserCurrentHost** profiles. + ## See also - [about_Automatic_Variables][01] diff --git a/reference/7.6/Microsoft.PowerShell.Core/About/about_Profiles.md b/reference/7.6/Microsoft.PowerShell.Core/About/about_Profiles.md index 66666eda168b..4c35a68f13be 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/About/about_Profiles.md +++ b/reference/7.6/Microsoft.PowerShell.Core/About/about_Profiles.md @@ -1,7 +1,7 @@ --- description: Describes how to create and use a PowerShell profile. Locale: en-US -ms.date: 03/18/2024 +ms.date: 05/01/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-7.6&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Profiles @@ -312,6 +312,15 @@ Invoke-Command -Session $s -ScriptBlock { After running this command, the commands that the profile adds to the session are available in `$s`. +## Profiles for MSIX-based installations + +For MSIX-based installations of PowerShell, the **AllUsersAllHosts** and +**AllUsersCurrentHost** profile scripts must reside in the `$PSHOME` directory. +Because the MSIX package is installed in a read-only location, you can't create +or modify profile scripts in `$PSHOME`. Therefore, these profiles aren't +available for MSIX-based installations, and you can only create and use the +**CurrentUserAllHosts** and **CurrentUserCurrentHost** profiles. + ## See also - [about_Automatic_Variables][01] diff --git a/reference/7.7/Microsoft.PowerShell.Core/About/about_Profiles.md b/reference/7.7/Microsoft.PowerShell.Core/About/about_Profiles.md index f9596b0d20c7..3f083145ed0d 100644 --- a/reference/7.7/Microsoft.PowerShell.Core/About/about_Profiles.md +++ b/reference/7.7/Microsoft.PowerShell.Core/About/about_Profiles.md @@ -1,7 +1,7 @@ --- description: Describes how to create and use a PowerShell profile. Locale: en-US -ms.date: 03/18/2024 +ms.date: 05/01/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-7.7&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Profiles @@ -312,6 +312,15 @@ Invoke-Command -Session $s -ScriptBlock { After running this command, the commands that the profile adds to the session are available in `$s`. +## Profiles for MSIX-based installations + +For MSIX-based installations of PowerShell, the **AllUsersAllHosts** and +**AllUsersCurrentHost** profile scripts must reside in the `$PSHOME` directory. +Because the MSIX package is installed in a read-only location, you can't create +or modify profile scripts in `$PSHOME`. Therefore, these profiles aren't +available for MSIX-based installations, and you can only create and use the +**CurrentUserAllHosts** and **CurrentUserCurrentHost** profiles. + ## See also - [about_Automatic_Variables][01] diff --git a/reference/docs-conceptual/install/install-powershell-on-windows.md b/reference/docs-conceptual/install/install-powershell-on-windows.md index c432e779340b..69bbbe2aa2c5 100644 --- a/reference/docs-conceptual/install/install-powershell-on-windows.md +++ b/reference/docs-conceptual/install/install-powershell-on-windows.md @@ -1,6 +1,6 @@ --- description: How to install PowerShell on Windows -ms.date: 04/22/2026 +ms.date: 05/01/2026 title: Install PowerShell 7 on Windows --- # Install PowerShell 7 on Windows @@ -206,9 +206,9 @@ Add-AppxPackage -Path ".\PowerShell-7.6.1.msixbundle" #### Limitations of a MSIX-based installation Store-based installations are installed for a single user. There is no option to install it for all -users. By default, Microsoft Store packages run in an application sandbox that virtualizes access to -some filesystem and registry locations. Changes to virtualized file and registry locations don't -persist outside of the application sandbox. +users. Microsoft Store packages run in an application sandbox that virtualizes access to some +filesystem and registry locations. Changes to virtualized file and registry locations don't persist +outside of the application sandbox. Store-based installations don't support PowerShell remoting. The application sandbox blocks all changes to the application's root folder. Any system-level configuration settings stored in @@ -224,11 +224,14 @@ need write access to `$PSHOME`. - `Enable-ExperimentalFeature -Scope AllUsers` - `Set-ExecutionPolicy -Scope LocalMachine` -For more information, see [Understanding how packaged desktop apps run on Windows][06]. +For MSIX-based installations, you can't create profile scripts for the **AllUsersAllHosts** and +**AllUsersCurrentHost** because those profile scripts must be in `$PSHOME`. + +The PowerShell package is exempt from file and registry virtualization. Changes to virtualized file +and registry locations now persist outside of the application sandbox. However, changes to the +application's root folder are still blocked. -Beginning in PowerShell 7.2, the PowerShell package is now exempt from file and registry -virtualization. Changes to virtualized file and registry locations now persist outside of the -application sandbox. However, changes to the application's root folder are still blocked. +For more information, see [Understanding how packaged desktop apps run on Windows][06]. > [!IMPORTANT] > You must be running on Windows build 1903 or higher for this exemption to work. From 78f0d7ccd70b4291c626d290afb94a505f13e848 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Fri, 1 May 2026 10:27:48 -0500 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../7.4/Microsoft.PowerShell.Core/About/about_Profiles.md | 7 ++++--- .../7.5/Microsoft.PowerShell.Core/About/about_Profiles.md | 7 ++++--- .../7.6/Microsoft.PowerShell.Core/About/about_Profiles.md | 7 ++++--- .../7.7/Microsoft.PowerShell.Core/About/about_Profiles.md | 5 +++-- .../install/install-powershell-on-windows.md | 5 +++-- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Profiles.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Profiles.md index 07f59bd3b027..95b652100c87 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Profiles.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Profiles.md @@ -317,9 +317,10 @@ are available in `$s`. For MSIX-based installations of PowerShell, the **AllUsersAllHosts** and **AllUsersCurrentHost** profile scripts must reside in the `$PSHOME` directory. Because the MSIX package is installed in a read-only location, you can't create -or modify profile scripts in `$PSHOME`. Therefore, these profiles aren't -available for MSIX-based installations, and you can only create and use the -**CurrentUserAllHosts** and **CurrentUserCurrentHost** profiles. +or modify profile scripts in `$PSHOME`. Therefore, user customization through +these all-users profiles isn't supported for MSIX-based installations, and you +can only create and use the **CurrentUserAllHosts** and +**CurrentUserCurrentHost** profiles. ## See also diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Profiles.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Profiles.md index 129809806795..9226619369bc 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Profiles.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Profiles.md @@ -317,9 +317,10 @@ are available in `$s`. For MSIX-based installations of PowerShell, the **AllUsersAllHosts** and **AllUsersCurrentHost** profile scripts must reside in the `$PSHOME` directory. Because the MSIX package is installed in a read-only location, you can't create -or modify profile scripts in `$PSHOME`. Therefore, these profiles aren't -available for MSIX-based installations, and you can only create and use the -**CurrentUserAllHosts** and **CurrentUserCurrentHost** profiles. +or modify profile scripts in `$PSHOME`. Therefore, user customization through +these all-users profiles isn't supported for MSIX-based installations, and you +can only create and use the **CurrentUserAllHosts** and +**CurrentUserCurrentHost** profiles. ## See also diff --git a/reference/7.6/Microsoft.PowerShell.Core/About/about_Profiles.md b/reference/7.6/Microsoft.PowerShell.Core/About/about_Profiles.md index 4c35a68f13be..cdba65ff1c6d 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/About/about_Profiles.md +++ b/reference/7.6/Microsoft.PowerShell.Core/About/about_Profiles.md @@ -317,9 +317,10 @@ are available in `$s`. For MSIX-based installations of PowerShell, the **AllUsersAllHosts** and **AllUsersCurrentHost** profile scripts must reside in the `$PSHOME` directory. Because the MSIX package is installed in a read-only location, you can't create -or modify profile scripts in `$PSHOME`. Therefore, these profiles aren't -available for MSIX-based installations, and you can only create and use the -**CurrentUserAllHosts** and **CurrentUserCurrentHost** profiles. +or modify profile scripts in `$PSHOME`. Therefore, user customization through +these all-users profiles isn't supported for MSIX-based installations, and you +can only create and use the **CurrentUserAllHosts** and +**CurrentUserCurrentHost** profiles. ## See also diff --git a/reference/7.7/Microsoft.PowerShell.Core/About/about_Profiles.md b/reference/7.7/Microsoft.PowerShell.Core/About/about_Profiles.md index 3f083145ed0d..f96b2e68081a 100644 --- a/reference/7.7/Microsoft.PowerShell.Core/About/about_Profiles.md +++ b/reference/7.7/Microsoft.PowerShell.Core/About/about_Profiles.md @@ -317,8 +317,9 @@ are available in `$s`. For MSIX-based installations of PowerShell, the **AllUsersAllHosts** and **AllUsersCurrentHost** profile scripts must reside in the `$PSHOME` directory. Because the MSIX package is installed in a read-only location, you can't create -or modify profile scripts in `$PSHOME`. Therefore, these profiles aren't -available for MSIX-based installations, and you can only create and use the +or modify profile scripts in `$PSHOME`. Therefore, user customization via the +**AllUsersAllHosts** and **AllUsersCurrentHost** profiles isn't supported for +MSIX-based installations, and you can only create and customize the **CurrentUserAllHosts** and **CurrentUserCurrentHost** profiles. ## See also diff --git a/reference/docs-conceptual/install/install-powershell-on-windows.md b/reference/docs-conceptual/install/install-powershell-on-windows.md index 69bbbe2aa2c5..6cc0abc1a934 100644 --- a/reference/docs-conceptual/install/install-powershell-on-windows.md +++ b/reference/docs-conceptual/install/install-powershell-on-windows.md @@ -224,8 +224,9 @@ need write access to `$PSHOME`. - `Enable-ExperimentalFeature -Scope AllUsers` - `Set-ExecutionPolicy -Scope LocalMachine` -For MSIX-based installations, you can't create profile scripts for the **AllUsersAllHosts** and -**AllUsersCurrentHost** because those profile scripts must be in `$PSHOME`. +For MSIX-based installations, you can't create or modify the all-users profile scripts +`$PROFILE.AllUsersAllHosts` and `$PROFILE.AllUsersCurrentHost` because those profiles must be +stored in `$PSHOME`. Current-user profiles are still supported. The PowerShell package is exempt from file and registry virtualization. Changes to virtualized file and registry locations now persist outside of the application sandbox. However, changes to the