In the open source PowerShell Core, the directory containing the user's profile is PowerShell instead of WindowsPowerShell. Instead of finding the MyDocuments directory and building up the profile path from there, hardcoding in WindowsPowerShell, the proposed changes utilize the $PROFILE variable itself to determine the path to use for profile edits.
It was determined from profile path used in the existing Install.ps1 script that the targeted profile is the one for the current user, and all hosts. Therefore, this profile is hardcoded in as the default profile in the proposed script as well.
This provides compatibility between Windows PowerShell 5.1 shipped with Windows, and PowerShell Core, automatically setting the correct profile directory.
In the open source PowerShell Core, the directory containing the user's profile is
PowerShell
instead ofWindowsPowerShell
. Instead of finding theMyDocuments
directory and building up the profile path from there, hardcoding inWindowsPowerShell
, the proposed changes utilize the$PROFILE
variable itself to determine the path to use for profile edits.It was determined from profile path used in the existing Install.ps1 script that the targeted profile is the one for the current user, and all hosts. Therefore, this profile is hardcoded in as the default profile in the proposed script as well.
This provides compatibility between Windows PowerShell 5.1 shipped with Windows, and PowerShell Core, automatically setting the correct profile directory.