Get-OneDriveDirectory returns location of the OneDrive files.
We could have on the computer two OneDrive’s one Personal and second one Corporate (Business). Script by default returns both, but we could use switch parameter to precise our request.
To return directory path module searches through registry.
Information about OneDrive accounts is stored in
Under this location we could have two items:
Each account has registry string value (UserFolder) which tells us what is the location of particular OneDrive.