windows - How can I change PowerShell's $PROFILE to point to the local ...
Windows 10 has a unique problem in version 1809 with the "Office" app creating strangely linked files and directories under the user profile. Even WMI can't delete the profile, nor powershell.
You should consider both environments if you want to always execute the profile code. The paths are: C:\Windows\System32\WindowsPowerShell\v1.0 for the 64bit environment C:\Windows\SysWow64\WindowsPowerShell\v1.0 for the 32bit one (Yeah I know, the folder naming is counterintuitive, but it's correct).
Delete local windows profile with PowerShell Asked 15 years, 7 months ago Modified 9 years, 11 months ago Viewed 28k times
Windows 7 Profile Default Image Files Location Asked 13 years, 2 months ago Modified 13 years, 2 months ago Viewed 18k times
What I would like to be able to do is pump the Windows profile name and the sid into a text file formatted like the following, then I can edit fairly quickly, remove non-Windows user profile entries (like default or system accounts) and run my working code above against the listings - edited to have just a list of SIDS like in the working code ...
cmd - How to extract Windows user profile SIDs from registry into text ...
In my case, it was "D:\OneDrive\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1" So, I manually create the " WindowsPowerShell " folder inside Documents and the " Microsoft.PowerShell_profile.ps1 " file in WindowsPowerShell. Then pasted the content in the profile. Import-Module posh-git Import-Module oh-my-posh Set-PoshPrompt ...