PowerShell module for controlling the STRATO HiDrive desktop application and reading the configured sync root directory from HiDrive logs. This module was primarily created for personal use.
StratoHiDriveUtils/
|-- .gitignore # Git ignore rules
|-- License.md # MIT license for this project
|-- StratoHiDriveUtils.psd1 # Module manifest
|-- StratoHiDriveUtils.psm1 # Main module with exported functions
`-- README.md # This documentation
The module is defined by StratoHiDriveUtils.psd1 and loads StratoHiDriveUtils.psm1.
It exports three functions:
Start-HiDriveStop-HiDriveGet-HiDriveSyncRoot
- Windows
- PowerShell 5.1+ (PowerShell 7 also works)
- Installed STRATO HiDrive desktop client
- Read access to
%LOCALAPPDATA%\HiDrive\Logsand%LOCALAPPDATA%\HiDrive\Data
The latest version is available as a ZIP file on the Releases page.
After downloading, extract the ZIP into the appropriate module directory:
| PowerShell Version | Target Directory |
|---|---|
| Windows PowerShell 5.1 | %USERPROFILE%\Documents\WindowsPowerShell\Modules\StratoHiDriveUtils |
| PowerShell 7+ | %USERPROFILE%\Documents\PowerShell\Modules\StratoHiDriveUtils |
Note: The target directory must be named
StratoHiDriveUtilsfor PowerShell to auto-discover the module.
Then load the module:
Import-Module StratoHiDriveUtils -Force
Get-Command -Module StratoHiDriveUtilsCopy the matching block and paste it into your PowerShell.
New-Item -ItemType Directory -Path "$(($env:PSModulePath -split ';')[0])\StratoHiDriveUtils" -Force | Out-Null
git clone https://github.com/DonGrobione/StratoHiDriveUtils.git "$(($env:PSModulePath -split ';')[0])\StratoHiDriveUtils"
Import-Module StratoHiDriveUtils -Force
Get-Command -Module StratoHiDriveUtilsgit -C "$(($env:PSModulePath -split ';')[0])\StratoHiDriveUtils" pull
Remove-Module StratoHiDriveUtils -Force -ErrorAction SilentlyContinue
Import-Module StratoHiDriveUtils -ForceNew-Item -ItemType Directory -Path "$(($env:PSModulePath -split ';')[0])\StratoHiDriveUtils" -Force | Out-Null
git clone https://github.com/DonGrobione/StratoHiDriveUtils.git "$(($env:PSModulePath -split ';')[0])\StratoHiDriveUtils"
Import-Module StratoHiDriveUtils -Force
Get-Command -Module StratoHiDriveUtilsgit -C "$(($env:PSModulePath -split ';')[0])\StratoHiDriveUtils" pull
Remove-Module StratoHiDriveUtils -Force -ErrorAction SilentlyContinue
Import-Module StratoHiDriveUtils -ForceImport-Module StratoHiDriveUtils -Force
Start-HiDriveStart-HiDrive checks common install paths and starts HiDrive.App.exe.
If no executable is found, the function throws an error.
Import-Module StratoHiDriveUtils -Force
Stop-HiDriveStop-HiDrive stops all processes whose name matches *HiDrive*.
The function first sends a graceful close request and then force-stops remaining matching processes.
If no process is running, it exits without error.
In practice, HiDrive.App and HiDrive.Sync are both terminated reliably.
Import-Module StratoHiDriveUtils -Force
Get-HiDriveSyncRootThis returns the sync root path directly (string), for example:
C:\Users\<User>\HiDrive
If no matching log entry is found, the function returns $null.
Optional guarded usage:
Import-Module StratoHiDriveUtils -Force
$syncRoot = Get-HiDriveSyncRoot
if ($null -ne $syncRoot) {
"Sync root: $syncRoot"
} else {
"No sync root entry found in HiDrive logs."
}The sync root is actually stored by HiDrive in the SQLite database %LOCALAPPDATA%\HiDrive\Data\user.db.
In practice, reading that value requires additional SQLite software or editor extensions. To keep this module dependency-free, Get-HiDriveSyncRoot reads the sync root from HiDrive log entries instead.
The function searches in this order:
- Current log path:
%LOCALAPPDATA%\HiDrive\Logs\log.txt - Legacy fallback:
%LOCALAPPDATA%\HiDrive\Data\<numeric folder>\syncLog.txt
It extracts entries matching:
FileSystemSnapshot: Get file system snapshot started. Root <path> |
Start-HiDrivefails:- Verify STRATO HiDrive is installed.
- Verify one of these files exists:
%ProgramFiles%\STRATO\HiDrive\HiDrive.App.exe%ProgramFiles(x86)%\STRATO\HiDrive\HiDrive.App.exe%LOCALAPPDATA%\STRATO\HiDrive\HiDrive.App.exe
Get-HiDriveSyncRootreturns$null:- HiDrive may not have completed an initial scan yet.
- Check whether log files exist under
%LOCALAPPDATA%\HiDrive\Logs. - Start HiDrive once and allow it to run briefly before trying again.
- Module version source of truth:
StratoHiDriveUtils.psd1(ModuleVersion). - Current manifest version:
1.1.3. - The module file
StratoHiDriveUtils.psm1does not duplicate module version metadata.
This project is licensed under the MIT License. See License.md for the full license text.
I am in no way affiliated with STRATO or HiDrive. This project is an independent, unofficial utility module and is not endorsed by, sponsored by, or connected to STRATO/HiDrive.
This module was created with support from AI/KI tooling.