Skip to content

Commit 49c4d10

Browse files
sdwheelerDCtheGeek
authored andcommitted
Fixes #4837 - fix profile paths for Windows PS (#4840)
1 parent cf05aac commit 49c4d10

File tree

6 files changed

+40
-40
lines changed

6 files changed

+40
-40
lines changed

reference/3.0/Microsoft.PowerShell.Core/About/about_profiles.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ profile has the highest precedence.
4040

4141
|Description | Path |
4242
|--------------------------|-----------------------------------------------|
43-
|All Users, All Hosts |$PsHome\\Profile.ps1 |
44-
|All Users, Current Host |$PsHome\\Microsoft.PowerShell_profile.ps1 |
45-
|Current User, All Hosts |$Home\\[My ]Documents\\PowerShell\\Profile.ps1 |
46-
|Current user, Current Host|$Home\\[My ]Documents\\PowerShell\\<br>Microsoft.PowerShell_profile.ps1 |
43+
|All Users, All Hosts |$PSHOME\\Profile.ps1 |
44+
|All Users, Current Host |$PSHOME\\Microsoft.PowerShell_profile.ps1 |
45+
|Current User, All Hosts |$Home\\[My ]Documents\\WindowsPowerShell\\Profile.ps1 |
46+
|Current user, Current Host|$Home\\[My ]Documents\\WindowsPowerShell\\<br>Microsoft.PowerShell_profile.ps1 |
4747

4848
The profile paths include the following variables:
4949

50-
- The `$PsHome` variable, which stores the installation directory for
50+
- The `$PSHOME` variable, which stores the installation directory for
5151
PowerShell
5252
- The `$Home` variable, which stores the current user's home directory
5353

@@ -57,7 +57,7 @@ supports the following host-specific profiles.
5757

5858
|Description | Path |
5959
|--------------------------|--------------------------------------------|
60-
|All users, Current Host |$PsHome\\Microsoft.PowerShellISE_profile.ps1|
60+
|All users, Current Host |$PSHOME\\Microsoft.PowerShellISE_profile.ps1|
6161
|Current user, Current Host|$Home\\[My ]Documents\\WindowsPowerShell\\<br>Microsoft.PowerShellISE_profile.ps1 |
6262

6363
In PowerShell Help, the "CurrentUser, Current Host" profile is the profile
@@ -227,7 +227,7 @@ function Get-CmdletAlias ($cmdletname) {
227227
function Color-Console {
228228
$Host.ui.rawui.backgroundcolor = "white"
229229
$Host.ui.rawui.foregroundcolor = "black"
230-
$hosttime = (Get-ChildItem -Path $pshome\PowerShell.exe).CreationTime
230+
$hosttime = (Get-ChildItem -Path $PSHOME\PowerShell.exe).CreationTime
231231
$hostversion="$($Host.Version.Major)`.$($Host.Version.Minor)"
232232
$Host.UI.RawUI.WindowTitle = "PowerShell $hostversion ($hosttime)"
233233
Clear-Host

reference/4.0/Microsoft.PowerShell.Core/About/about_profiles.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ profile has the highest precedence.
4040

4141
|Description | Path |
4242
|--------------------------|-----------------------------------------------|
43-
|All Users, All Hosts |$PsHome\\Profile.ps1 |
44-
|All Users, Current Host |$PsHome\\Microsoft.PowerShell_profile.ps1 |
45-
|Current User, All Hosts |$Home\\[My ]Documents\\PowerShell\\Profile.ps1 |
46-
|Current user, Current Host|$Home\\[My ]Documents\\PowerShell\\<br>Microsoft.PowerShell_profile.ps1 |
43+
|All Users, All Hosts |$PSHOME\\Profile.ps1 |
44+
|All Users, Current Host |$PSHOME\\Microsoft.PowerShell_profile.ps1 |
45+
|Current User, All Hosts |$Home\\[My ]Documents\\WindowsPowerShell\\Profile.ps1 |
46+
|Current user, Current Host|$Home\\[My ]Documents\\WindowsPowerShell\\<br>Microsoft.PowerShell_profile.ps1 |
4747

4848
The profile paths include the following variables:
4949

50-
- The `$PsHome` variable, which stores the installation directory for
50+
- The `$PSHOME` variable, which stores the installation directory for
5151
PowerShell
5252
- The `$Home` variable, which stores the current user's home directory
5353

@@ -57,7 +57,7 @@ supports the following host-specific profiles.
5757

5858
|Description | Path |
5959
|--------------------------|--------------------------------------------|
60-
|All users, Current Host |$PsHome\\Microsoft.PowerShellISE_profile.ps1|
60+
|All users, Current Host |$PSHOME\\Microsoft.PowerShellISE_profile.ps1|
6161
|Current user, Current Host|$Home\\[My ]Documents\\WindowsPowerShell\\<br>Microsoft.PowerShellISE_profile.ps1 |
6262

6363
In PowerShell Help, the "CurrentUser, Current Host" profile is the profile
@@ -227,7 +227,7 @@ function Get-CmdletAlias ($cmdletname) {
227227
function Color-Console {
228228
$Host.ui.rawui.backgroundcolor = "white"
229229
$Host.ui.rawui.foregroundcolor = "black"
230-
$hosttime = (Get-ChildItem -Path $pshome\PowerShell.exe).CreationTime
230+
$hosttime = (Get-ChildItem -Path $PSHOME\PowerShell.exe).CreationTime
231231
$hostversion="$($Host.Version.Major)`.$($Host.Version.Minor)"
232232
$Host.UI.RawUI.WindowTitle = "PowerShell $hostversion ($hosttime)"
233233
Clear-Host

reference/5.0/Microsoft.PowerShell.Core/About/about_profiles.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ profile has the highest precedence.
4040

4141
|Description | Path |
4242
|--------------------------|-----------------------------------------------|
43-
|All Users, All Hosts |$PsHome\\Profile.ps1 |
44-
|All Users, Current Host |$PsHome\\Microsoft.PowerShell_profile.ps1 |
45-
|Current User, All Hosts |$Home\\[My ]Documents\\PowerShell\\Profile.ps1 |
46-
|Current user, Current Host|$Home\\[My ]Documents\\PowerShell\\<br>Microsoft.PowerShell_profile.ps1 |
43+
|All Users, All Hosts |$PSHOME\\Profile.ps1 |
44+
|All Users, Current Host |$PSHOME\\Microsoft.PowerShell_profile.ps1 |
45+
|Current User, All Hosts |$Home\\[My ]Documents\\WindowsPowerShell\\Profile.ps1 |
46+
|Current user, Current Host|$Home\\[My ]Documents\\WindowsPowerShell\\<br>Microsoft.PowerShell_profile.ps1 |
4747

4848
The profile paths include the following variables:
4949

50-
- The `$PsHome` variable, which stores the installation directory for
50+
- The `$PSHOME` variable, which stores the installation directory for
5151
PowerShell
5252
- The `$Home` variable, which stores the current user's home directory
5353

@@ -57,7 +57,7 @@ supports the following host-specific profiles.
5757

5858
|Description | Path |
5959
|--------------------------|--------------------------------------------|
60-
|All users, Current Host |$PsHome\\Microsoft.PowerShellISE_profile.ps1|
60+
|All users, Current Host |$PSHOME\\Microsoft.PowerShellISE_profile.ps1|
6161
|Current user, Current Host|$Home\\[My ]Documents\\WindowsPowerShell\\<br>Microsoft.PowerShellISE_profile.ps1 |
6262

6363
In PowerShell Help, the "CurrentUser, Current Host" profile is the profile
@@ -227,7 +227,7 @@ function Get-CmdletAlias ($cmdletname) {
227227
function Color-Console {
228228
$Host.ui.rawui.backgroundcolor = "white"
229229
$Host.ui.rawui.foregroundcolor = "black"
230-
$hosttime = (Get-ChildItem -Path $pshome\PowerShell.exe).CreationTime
230+
$hosttime = (Get-ChildItem -Path $PSHOME\PowerShell.exe).CreationTime
231231
$hostversion="$($Host.Version.Major)`.$($Host.Version.Minor)"
232232
$Host.UI.RawUI.WindowTitle = "PowerShell $hostversion ($hosttime)"
233233
Clear-Host

reference/5.1/Microsoft.PowerShell.Core/About/about_Profiles.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ profile has the highest precedence.
4040

4141
|Description | Path |
4242
|--------------------------|-----------------------------------------------|
43-
|All Users, All Hosts |$PsHome\\Profile.ps1 |
44-
|All Users, Current Host |$PsHome\\Microsoft.PowerShell_profile.ps1 |
45-
|Current User, All Hosts |$Home\\[My ]Documents\\PowerShell\\Profile.ps1 |
46-
|Current user, Current Host|$Home\\[My ]Documents\\PowerShell\\<br>Microsoft.PowerShell_profile.ps1 |
43+
|All Users, All Hosts |$PSHOME\\Profile.ps1 |
44+
|All Users, Current Host |$PSHOME\\Microsoft.PowerShell_profile.ps1 |
45+
|Current User, All Hosts |$Home\\[My ]Documents\\WindowsPowerShell\\Profile.ps1 |
46+
|Current user, Current Host|$Home\\[My ]Documents\\WindowsPowerShell\\<br>Microsoft.PowerShell_profile.ps1 |
4747

4848
The profile paths include the following variables:
4949

50-
- The `$PsHome` variable, which stores the installation directory for
50+
- The `$PSHOME` variable, which stores the installation directory for
5151
PowerShell
5252
- The `$Home` variable, which stores the current user's home directory
5353

@@ -57,7 +57,7 @@ supports the following host-specific profiles.
5757

5858
|Description | Path |
5959
|--------------------------|--------------------------------------------|
60-
|All users, Current Host |$PsHome\\Microsoft.PowerShellISE_profile.ps1|
60+
|All users, Current Host |$PSHOME\\Microsoft.PowerShellISE_profile.ps1|
6161
|Current user, Current Host|$Home\\[My ]Documents\\WindowsPowerShell\\<br>Microsoft.PowerShellISE_profile.ps1 |
6262

6363
In PowerShell Help, the "CurrentUser, Current Host" profile is the profile
@@ -227,7 +227,7 @@ function Get-CmdletAlias ($cmdletname) {
227227
function Color-Console {
228228
$Host.ui.rawui.backgroundcolor = "white"
229229
$Host.ui.rawui.foregroundcolor = "black"
230-
$hosttime = (Get-ChildItem -Path $pshome\PowerShell.exe).CreationTime
230+
$hosttime = (Get-ChildItem -Path $PSHOME\PowerShell.exe).CreationTime
231231
$hostversion="$($Host.Version.Major)`.$($Host.Version.Minor)"
232232
$Host.UI.RawUI.WindowTitle = "PowerShell $hostversion ($hosttime)"
233233
Clear-Host

reference/6/Microsoft.PowerShell.Core/About/about_Profiles.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ profile has the highest precedence.
4040

4141
|Description | Path |
4242
|--------------------------|-----------------------------------------------|
43-
|All Users, All Hosts |$PsHome\\Profile.ps1 |
44-
|All Users, Current Host |$PsHome\\Microsoft.PowerShell_profile.ps1 |
43+
|All Users, All Hosts |$PSHOME\\Profile.ps1 |
44+
|All Users, Current Host |$PSHOME\\Microsoft.PowerShell_profile.ps1 |
4545
|Current User, All Hosts |$Home\\[My ]Documents\\PowerShell\\Profile.ps1 |
4646
|Current user, Current Host|$Home\\[My ]Documents\\PowerShell\\<br>Microsoft.PowerShell_profile.ps1 |
4747

4848
The profile paths include the following variables:
4949

50-
- The `$PsHome` variable, which stores the installation directory for
50+
- The `$PSHOME` variable, which stores the installation directory for
5151
PowerShell
5252
- The `$Home` variable, which stores the current user's home directory
5353

@@ -57,8 +57,8 @@ host-specific profiles.
5757

5858
|Description | Path |
5959
|--------------------------|------------------------------------------|
60-
|All users, Current Host |$PsHome\\Microsoft.VSCode_profile.ps1 |
61-
|Current user, Current Host|$Home\\[My ]Documents\\WindowsPowerShell\\<br>Microsoft.VSCode_profile.ps1|
60+
|All users, Current Host |$PSHOME\\Microsoft.VSCode_profile.ps1|
61+
|Current user, Current Host|$Home\\[My ]Documents\\PowerShell\\<br>Microsoft.VSCode_profile.ps1|
6262

6363
In PowerShell Help, the "CurrentUser, Current Host" profile is the profile
6464
most often referred to as "your PowerShell profile".
@@ -227,7 +227,7 @@ function Get-CmdletAlias ($cmdletname) {
227227
function Color-Console {
228228
$Host.ui.rawui.backgroundcolor = "white"
229229
$Host.ui.rawui.foregroundcolor = "black"
230-
$hosttime = (Get-ChildItem -Path $pshome\PowerShell.exe).CreationTime
230+
$hosttime = (Get-ChildItem -Path $PSHOME\PowerShell.exe).CreationTime
231231
$hostversion="$($Host.Version.Major)`.$($Host.Version.Minor)"
232232
$Host.UI.RawUI.WindowTitle = "PowerShell $hostversion ($hosttime)"
233233
Clear-Host

reference/7/Microsoft.PowerShell.Core/About/about_Profiles.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ profile has the highest precedence.
4040

4141
|Description | Path |
4242
|--------------------------|-----------------------------------------------|
43-
|All Users, All Hosts |$PsHome\\Profile.ps1 |
44-
|All Users, Current Host |$PsHome\\Microsoft.PowerShell_profile.ps1 |
43+
|All Users, All Hosts |$PSHOME\\Profile.ps1 |
44+
|All Users, Current Host |$PSHOME\\Microsoft.PowerShell_profile.ps1 |
4545
|Current User, All Hosts |$Home\\[My ]Documents\\PowerShell\\Profile.ps1 |
4646
|Current user, Current Host|$Home\\[My ]Documents\\PowerShell\\<br>Microsoft.PowerShell_profile.ps1 |
4747

4848
The profile paths include the following variables:
4949

50-
- The `$PsHome` variable, which stores the installation directory for
50+
- The `$PSHOME` variable, which stores the installation directory for
5151
PowerShell
5252
- The `$Home` variable, which stores the current user's home directory
5353

@@ -57,8 +57,8 @@ host-specific profiles.
5757

5858
|Description | Path |
5959
|--------------------------|------------------------------------------|
60-
|All users, Current Host |$PsHome\\Microsoft.VSCode_profile.ps1 |
61-
|Current user, Current Host|$Home\\[My ]Documents\\WindowsPowerShell\\<br>Microsoft.VSCode_profile.ps1|
60+
|All users, Current Host |$PSHOME\\Microsoft.VSCode_profile.ps1|
61+
|Current user, Current Host|$Home\\[My ]Documents\\PowerShell\\<br>Microsoft.VSCode_profile.ps1|
6262

6363
In PowerShell Help, the "CurrentUser, Current Host" profile is the profile
6464
most often referred to as "your PowerShell profile".
@@ -227,7 +227,7 @@ function Get-CmdletAlias ($cmdletname) {
227227
function Color-Console {
228228
$Host.ui.rawui.backgroundcolor = "white"
229229
$Host.ui.rawui.foregroundcolor = "black"
230-
$hosttime = (Get-ChildItem -Path $pshome\PowerShell.exe).CreationTime
230+
$hosttime = (Get-ChildItem -Path $PSHOME\PowerShell.exe).CreationTime
231231
$hostversion="$($Host.Version.Major)`.$($Host.Version.Minor)"
232232
$Host.UI.RawUI.WindowTitle = "PowerShell $hostversion ($hosttime)"
233233
Clear-Host

0 commit comments

Comments
 (0)