OneDrive Backup
Revised: July 31, 2025
Overview
OneDrive Backup is a feature of OneDrive which automatically maps your local user profile folders to your OneDrive cloud share.
When you enable OneDrive Backup, PowerShell modules installed for your user profile are moved to a new location on disk and the PSModulePath environment variable is updated by OneDrive to reflect the change.
Default Path
By default, user-specific PowerShell modules are deployed to $env:USERPROFILE\Documents\WindowsPowerShell\Modules which looks like C:\Users\janedoe\Documents\WindowsPowerShell\Modules on a default installation of Windows with a user profile on the C:\ drive.
OneDrive Backup Path
When you enable OneDrive Backup, the contents of your $env:USERPROFILE\Documents folder gets moved to $env:ONEDRIVE\Documents which looks like C:\Users\janedoe\OneDrive\Documents on a default installation of Windows with a user profile on the C:\ drive for a personal OneDrive account.
As a result of this, OneDrive updates your PSModulePath and changes the default path to the OneDrive backup path.
Where PowerPass is Deployed
PowerPass is always deployed to your Default Path, even if you have OneDrive Backup enabled. PowerPass stores secrets in your local AppData folder which will never be backed up to OneDrive. If you are using OneDrive Backup, and you want to use PowerPass, deploy PowerPass for your user profile then move it to your OneDrive Documents folder.
How To Move PowerPass
In this example, Jane Doe is deploying PowerPass on her personal computer with OneDrive Backup enabled for her Documents folder.
- Jane deploys PowerPass for herself which gets deployed to
C:\Users\janedoe\Documents\WindowsPowerShell\Modules\PowerPass - She uses OneDrive Backup with her personal account
- Jane moves the
PowerPassfolder fromC:\Users\janedoe\Documents\WindowsPowerShell\ModulestoC:\Users\janedoe\OneDrive\Documents\WindowsPowerShell\Modules
Jane’s PowerPass installation will now be stored in the cloud in OneDrive.
All PowerPass Topics
Select one of the links below to browse to another topic.