@Haruki Nguyen
It builds it off of the Personal
value of your user folders, so you could technically change that to C:\Users\usrname.config
, but that could have other complications elsewhere. Another option is you could just have C:\Users\usrname\OneDrive\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
call C:\Users\usrname.config\PowerShell\Microsoft.PowerShell_profile.ps1
.
To change the user folder change this value:
Item: HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Property: Personal
Current: C:\Users\usrname\OneDrive\Documents
New: C:\Users\usrname.config
To call the other, put this line in C:\Users\usrname\OneDrive\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
:
&"$($UserProfile).config\PowerShell\Microsoft.PowerShell_profile.ps1"
You might also want to consider $PROFILE.AllUsersCurrentHost
as an alternative as well.