Introduction
Tired of manual SharePoint migrations? Frustrated by complex scripts and unpredictable results? You’re not alone. Managing content across different SharePoint sites, especially when restructuring or consolidating, can be a daunting, time-consuming, and error-prone process. The manual effort, the fear of data loss, and the sheer volume of files often hold organisations back from optimising their digital workspaces.
But what if there was a smarter way to move your valuable SharePoint content? What if you could orchestrate complex migrations with confidence, ensuring data integrity and user continuity?
The Solution: The SharePoint Drive Migrator – Your Smart Content Relocation Tool
I’ve developed a user-friendly tool to address these migration pain points directly. The SharePoint Drive Migrator simplifies the often-intricate task of moving files and folders between SharePoint sites or even within different document libraries on the same tenant. Built on robust Microsoft Graph API technology, it offers a reliable, scalable, and intelligent approach to content relocation.
What the SharePoint Drive Migrator Does
This intuitive tool guides you through the migration process, automating critical steps and providing clear insights, saving you countless hours and reducing risk:
- User-Friendly Configuration: Presents a clean, interactive desktop interface (PowerShell UI) where you input all necessary migration details.
- Intelligent Path Handling: Automatically resolves complex SharePoint site URLs and document library paths, allowing you to specify folders like “Documents/MySourceData” and handling the Graph API specifics behind the scenes.
- Server-Side Copy Leverage: Utilises Microsoft Graph’s efficient server-side copy operations wherever possible, drastically speeding up transfers and minimising local bandwidth consumption.
- Comprehensive Logging & Reporting: Generates detailed logs and CSV reports, tracking every item’s status (copied, skipped, failed, scanned) for full traceability and auditing.
- Smart Resume Capability: Can pick up exactly where it left off after an interruption, preventing duplicate efforts and ensuring completion of large migrations.
- Pre-Migration Scan (Dry Run): Offers a “scan mode” to identify potential issues (like path length limits, exclusions) before committing to a full copy, providing a crucial risk assessment.
- Concurrency Control: Allows you to define the maximum number of simultaneous file copy operations, optimising performance without overwhelming your network or SharePoint.
- Intelligent Retry Logic: Built-in resilience with exponential backoff for API calls, gracefully handling transient network issues or SharePoint throttling.
- Exclusion Management: Easily define file extensions (e.g.,
.tmp
,.bak
) and folder names (e.g.,$recycle
) to exclude from the migration, ensuring only relevant content is moved. - Hash Validation (for Files): Where supported by Graph API, the tool can compare SHA1 hashes of source and destination files to verify data integrity post-copy.
- Metadata Preservation: Aims to preserve essential metadata like
createdDateTime
andlastModifiedDateTime
for copied items.
How to Access and Use the SharePoint Drive Migrator
The SharePoint Drive Migrator is distributed as a powerful PowerShell script, offering flexibility and transparency.
To get started:
- Download the SharePoint Drive Migrator.exe
- Or you can download
SharePointDriveMigrator.ps1
script. - Ensure Prerequisites:
- PowerShell 5.1 or later: PowerShell 7.x is recommended for optimal performance and modern features.
- Azure AD App Registration: You’ll need an Azure AD application registration with the necessary Microsoft Graph API permissions (
Sites.ReadWrite.All
,Files.ReadWrite.All
). Ensure you have your Tenant ID, Application (Client) ID, and Client Secret Value.
- Run the Tool:
- You can run the SharePoint Drive Migrator.exe version.
- You execute the
SharePointDriveMigrator.ps1
script from a PowerShell console
(The -ExecutionPolicy Bypass allows the script to run without strict PowerShell execution policy restrictions, and -File specifies the script path.)# Navigate to the script's directory first
# cd C:\Path\To\Your\Script powershell.exe -ExecutionPolicy Bypass -File SharePointDriveMigrator.ps1
- You can run the SharePoint Drive Migrator.exe version.
Step-by-Step Guide to Using the SharePoint Drive Migrator
Step 1: Register the SharePoint Graph API App in Entra ID
To call Microsoft Graph securely, register an app in Microsoft Entra ID (formerly Azure AD).
1.1 Sign into Entra ID
Go to https://entra.microsoft.com and log in with a Global Admin account.
1.2 Register a New Application
- Navigate to: Identity> Applications >App Registration
- Click New Application

- Fill in:
- Name:
SharePointDocCopyApp
- Supported account types: “Accounts in this organisational directory only”
- Redirect URI:
http://localhost
(can be adjusted later)
- Name:
- Click Register

1.3 Add API Permissions to read SharePoint Sites
- Go to: API permissions > Add a permission > Microsoft Graph

- Select Application permissions
- Add:
Sites.Read.All
Sites.ReadWrite.All
- Click Add permissions

- Then, Grant admin consent

- A confirmation message will pop up, click on Yes

- Now, you will see the status has been changed to granted

1.4 Create Client Secret for the SharePoint Graph API App
- Go to Certificates & secrets > New client secret
- Set description and expiry

- Copy the client secret value (you won’t see it again)

Step 2: Collect Required Identifiers
From your Azure portal and SharePoint URLs, gather:
Parameter | Where to Find |
---|---|
Tenant ID | Azure AD > Overview |
Client ID | App Registration > Overview |
Client Secret | From Step 1.4 |
Source Site URL | e.g., https://<tenant>.sharepoint.com/sites/SourceSite |
Destination Site | e.g., https://<tenant>.sharepoint.com/sites/TargetSite |

Step 3: Run the SharePoint Driver Migration Tool
Upon launching the script, a user-friendly graphical interface (WinForms UI) will appear, guiding you through the configuration:

- Provide Azure AD Credentials:
- Tenant ID: Your Azure Active Directory (Microsoft Entra ID) Tenant ID.
- Application ID: The Application (Client) ID of your registered Azure AD app.
- Client Secret Value: The secret key generated for your Azure AD app. This value is handled securely within the script for the API call and is not stored permanently.
- Define SharePoint Paths:
- Source Site Specifier: The full URL of your source SharePoint site collection or subsite (e.g.,
yourdomain.sharepoint.com:/sites/SourceSite
). - Destination Site Specifier: The full URL of your target SharePoint site collection or subsite (e.g.,
yourdomain.sharepoint.com:/sites/DestinationSite
). - Source Folder Path: The path to the folder within the Documents library you want to migrate (e.g.,
Documents/ProjectFiles
or justDocuments
for the entire library). - Destination Folder Path: The path within the destination Documents library where you want the content to be placed (e.g.,
Documents/ArchivedProjects
).
- Source Site Specifier: The full URL of your source SharePoint site collection or subsite (e.g.,
- Select Operation Type:
- Start New Operation: For a fresh migration.
- Resume Previous Operation: If a previous run was interrupted, the tool will attempt to pick up from where it left off, avoiding re-copying already processed items.
- Configure Operational Settings:
- Run in Pre-Migration Scan Mode (Dry Run): Highly recommended! This performs a full traversal and generates a report of what would be copied, skipped, or fail, without actually moving any data.
- Attempt to Copy All File Versions (Limited Graph Support): Check this if you want to try migrating all versions. Note that Graph API’s direct full version history copy is not always comprehensive, and this feature may depend on Graph API evolution.
- Max Concurrent File Copies: Control the number of parallel file transfers. A higher number can speed up large migrations but may impact network performance or lead to throttling.
- Initial Retry Pause (seconds): Sets the initial delay for API request retries.
- Set Exclusions:
- Exclude File Extensions: Provide a comma-separated list of file extensions (e.g.,
tmp,bak,DS_Store
) to ignore. - Exclude Folder Names: Provide a comma-separated list of folder names (e.g.,
$recycle,Forms
) to ignore.
- Exclude File Extensions: Provide a comma-separated list of file extensions (e.g.,
- Click “OK” to Begin!

- The tool will then initiate the process, displaying a live progress bar and status updates directly in a separate window.

- Then the tool will show a message to let you know that the migration log has been created in C:\SharePointMigrationLogs


Below you can see a SharePoint Site 1 with the files required to be moved to Site 2, which is empty before the migration


Then Destination got the copied file from Site1

Benefits of Using the SharePoint Drive Migrator
- Efficiency & Speed: Automates tedious tasks and leverages server-side copies, significantly reducing migration time compared to manual methods.
- Reliability & Data Integrity: Built-in retry mechanisms and optional hash validation ensure that your data arrives at its destination complete and uncorrupted.
- Cost-Effective: Reduces the need for expensive third-party migration tools for common SharePoint content transfer scenarios.
- Transparency & Auditability: Detailed logs and reports provide a clear audit trail of every item processed, crucial for compliance and troubleshooting.
- Flexibility & Control: Gives administrators granular control over migration parameters, including concurrency, exclusions, and resume capabilities.
- Reduced Administrative Burden: Frees up IT resources from repetitive manual tasks, allowing them to focus on higher-value strategic initiatives.
- Enhanced User Experience: Ensures a smoother transition for end-users by minimising downtime and preserving data integrity.
Best Practices and Considerations
Category | Best Practice | Details & Recommendations |
---|---|---|
🧠 Planning & Preparation | Conduct a Full Content Inventory | Assess what content needs to be migrated — including size, structure, and age. Classify content by importance or sensitivity to aid prioritization. |
Define a Permissions Strategy | Permissions are not migrated automatically. Identify required permission levels in the destination and prepare to apply them separately. | |
Communicate with Users Early | Notify stakeholders of migration timelines, expected downtimes, and post-migration access changes. Transparency reduces disruption and user frustration. | |
🔍 Pre-Migration Checks | Run a Comprehensive Pre-Migration Scan | Use Scan Mode to detect issues like:– Invalid file paths– Unsupported characters– Excluded file types/folders. Analyze the scan report in detail to resolve issues before actual migration begins. |
🧪 Pilot & Test | Use Scan Mode to detect issues like:– Invalid file paths– Unsupported characters– Excluded file types/folders. Analyse the scan report in detail to resolve issues before actual migration begins. | Migrate a small, low-risk content set first. Validate process, review output, adjust settings, and refine concurrency parameters. |
📊 Monitoring & Feedback | Monitor Logs & Console Outputs in Real Time | Stay alert to migration warnings or errors by monitoring live logs. Quickly address issues to avoid cascading failures. |
🌐 Technical Considerations | Assess Network Bandwidth Impact | Although the tool uses server-side copy, API calls and status polling consume internet bandwidth. Schedule large migrations during off-peak hours if possible. |
Prepare for SharePoint Online Throttling | SharePoint may throttle bulk operations. The tool retries automatically, but if frequent HTTP 429 errors occur, reduce Max Concurrent File Copies and increase the Initial Retry Pause in settings. | |
Validate Path Length Limits | SharePoint enforces strict path length limits (e.g., 400 characters). Shorten folder or file names proactively if flagged during scanning. | |
🗂️ Content Rules | Review Exclusion Filters | Double-check Excluded File Extensions and Excluded Folder Names to ensure you’re not inadvertently omitting important data. |
🛡️ Data Protection | Backup Critical Source Content | For high-value or sensitive content, take a backup of your source site as a contingency before initiating the migration. |
✅ Post-Migration Tasks | Perform Post-Migration Validation | Conduct spot checks to ensure:– Files and folders migrated as expected– Metadata is intact– Permissions and access are correct– No missing or corrupted items |
Conclusion
While SharePoint content migration might seem like a daunting challenge, the SharePoint Drive Migrator transforms it into a streamlined, manageable process. By automating key steps, providing robust logging, and offering intelligent features like pre-migration scans and resume capabilities, this tool empowers IT administrators to handle complex content relocations with confidence.
As with any powerful tool, we always recommend conducting a thorough pre-migration scan (dry run) and initial tests on a small scale before initiating any large-scale deployments. Your feedback and suggestions are invaluable as we continue to enhance this solution to meet evolving SharePoint and Microsoft 365 migration needs!