Description
Recent releases of Windows 10 have replaced the Documents folder in a user's profile with OneDrive\Documents, which is automatically mirrored into each user's cloud-hosted OneDrive account. OneDrive only offers 5GB of cloud space for free, and once that is full important documents may not be mirrored into the cloud. Since Windows PowerShell modules can be quite large (the Az module bundle is 53MB, and the AWSPowerShell.NetCore module bundle is 81MB), it doesn't take much time with side-by-side versioning of frequently updated modules installed in a local user profile to start consuming a lot of OneDrive space, when there is no need to back those files up to OneDrive whatsoever since they are installed from a cloud repository.
To correct this, and provide one less reason for users' free OneDrive space to be completely and unnecessarily consumed, I propose that the Documents\PowerShell
folder for PowerShell Core on Windows be moved and renamed to ${env:USERPROFILE}\.powershell
. This new location and naming is in line with other products like Nuget (uses a .nuget folder for package storage), VS Code (uses .vscode), LibMan in Visual Studio (uses .librarymanager), and many more. This shift is the right approach based on new handling and best practices for a user's Documents folder in Windows, which should only be used to store documents that users want automatically backed up into the cloud.