Forum Discussion
Fix a broken $Profie location
- Apr 29, 2024
Ah in my case I have C:\Users\daniel\OneDrive and also through syncing with the other laptop the C:\Users\danie\OneDrive ( I originally caused issue with my bad spelling lol.)
So do I correct all the ones with the incorrect spelling given I have corrected the issue with the profile name.
Hi the original issue was caused due my attempting at fixing an invalid profile name on my other laptop with OneDrive Documents in place . Essentially, I want the profile just to reference my local path.
I made another attempt at fixing the profile:
$PROFILE = "$env:USERPROFILE\Documents\PowerShell\Microsoft.PowerShell_profile.ps1"
This re-enables my Oh My Posh settings but doesn't seem to persist the $Profile path
- Daniel WesterdaleApr 29, 2024Brass Contributor
Good morning. No backup as yet which I will remedy shortly. I do appear to have lost the My Documents quick access although Downloads, Music, Pictures all seem ok.
You have got me thinking : open up the recycle bin as all my previous PowerShell modules are located at c:\daniel\OneDrive\Documents\WindowsPowerShell\Modules.
Could these be the next steps:
- Restore these and back up this directory
- Re-add Documents to OneDrive
- Copy files over from backed up directory
- Check / amend the $Profile
- Apr 29, 2024It seems like a plan to get things back to where they were and move on from there. But check the Known Folder Move /backup settings in the OneDrive client. Default is c:\users\username\documents\WindowsPowerShell\Modules, but with Known Folder Move/backup settings enabled in OneDrive, they are in the OneDrive folder
- Daniel WesterdaleApr 29, 2024Brass ContributorI am currently restoring Documents from the Recycle bin ... um there is quite a lot of files so it is taking a while. I have looked at the Settings/ backup and not seeing anything for the PS modules. However I do appear to be restoring lots of files from c:\users\username\documents\WindowsPowerShell\Modules so I guess that is the indicator.