A PowerShell script for managing SharePoint sites using Rclone. This tool provides an interactive terminal interface for connecting to SharePoint, managing sites, and mounting them as local drives.
- PowerShell 7.0 or later
- Rclone installed and available in PATH
- Microsoft Graph PowerShell SDK modules:
- Microsoft.Graph.Authentication
- Microsoft.Graph.Sites
- Microsoft.Graph.Files
- Install the required PowerShell modules:
Install-Module Microsoft.Graph.Authentication
Install-Module Microsoft.Graph.Sites
Install-Module Microsoft.Graph.Files-
Install Rclone from https://rclone.org/downloads/
-
Download the
RcloneSharePointManager.ps1script to your preferred location
- Automatic Microsoft Graph authentication
- SharePoint site discovery and management
- Azure Application registration for Rclone
- Local mounting of SharePoint sites
- Interactive terminal interface with color coding
- Persistent session state
- Comprehensive logging
- Run the script:
./RcloneSharePointManager.ps1- The script will automatically attempt to connect to Microsoft Graph
- Use the interactive menu to:
- Check Rclone installation
- Register Azure applications
- List available SharePoint sites
- Select sites for mounting
- Mount sites to local directories
-
Check Rclone Installation
- Verifies Rclone is properly installed
- Displays version information
-
Register Azure Application
- Creates a new Azure AD application
- Configures necessary permissions
- Generates and saves Rclone configuration
-
List SharePoint Sites
- Displays all accessible SharePoint sites
- Shows site names, URLs, and IDs
-
Select SharePoint Site
- Interactive site selection
- Required before mounting
-
Mount Selected Site
- Mounts selected SharePoint site locally
- Creates mount point if needed
- Uses Rclone daemon mode
The interface shows:
- Currently logged-in user
- Selected SharePoint site
- Currently mounted sites
- Operation status and logs
The script requires the following Microsoft Graph permissions:
- Sites.Read.All
- Sites.ReadWrite.All
- User.Read.All
- Group.Read.All
- Group.ReadWrite.All
- Application.ReadWrite.All
- Directory.ReadWrite.All
- The script maintains state during execution
- Mount points are tracked between operations
- Color coding indicates status and warnings
- Automatic error handling and recovery
- Cross-platform compatible (Windows, macOS, Linux)
- Automatic connection retry
- Clear error messages
- Graceful failure recovery
- Detailed logging
For issues, questions, or contributions, please:
- Check the prerequisites are installed
- Verify Rclone is properly configured
- Ensure you have the necessary permissions
- Check the logs for detailed error information