Productivity Tools

Tools written by an IT business manager, a passionate developer.

Get-OneDriveDirectory

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.

Get-OneDriveDirectory Get-OneDriveDirectory -Personal Get-OneDriveDirectory -Business Get-OneDriveDirectory -Personal -JustDirectory Get-OneDriveDirectory -Business -JustDirectory Get-OneDriveDirectory -JustDirectory

GetOneDriveDirectory

Information about OneDrive accounts is stored in

HKEY_CURRENT_USER\Software\Microsoft\OneDrive\Accounts

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.

Registry