Some times ago I installed some additional components for PowerShell and a folder popped up inside my personal Documents folder. Its path is:
c:\Users%username%\OneDrive\Documents\WindowsPowerShell
Is there a way I can move this to another location?
PS : please apps, leave my personal Documents folder alone.
Technically I think you could move it, but many things that are ‘currentuser’ scoped will always go to that path such as Install-Module. If you changed it you would have a heck of a time getting things working IMO. You’re better off just leaving it.
So no way to do this at the present time?
There are too many apps creating folder in Documents. If I keep the folder WindowsPowerShell in my Documents folder, and if I make it hidden, the scripts won’t work.
My workaround is to install all PS modules with scope AllUsers - you need an elevated PS session to do that. It’s sub-optimal, but it installs them outside of my user profile.