Important
Visit TenuVault.com for an easier, more powerful backup solution:
- No installation required - Works directly in your browser
- Enhanced UI - Visual interface with drag-and-drop support
- Cloud storage - Automatic backup storage and versioning
- Automated scheduling - Set up recurring backups
- Drift Control - Compare backups and detect changes
- Audit Logs - Track all changes and restores
- Documentation - Comprehensive documentation and guides
A comprehensive backup and restore solution for Microsoft Intune configurations. TenuVault ensures your Intune policies are safely backed up and can be restored when needed, without ever modifying or deleting your existing configurations.
Available on PowerShell Gallery: Install with a single command Install-Script -Name TenuVault
- Overview
- Key Features
- Safety First
- Requirements
- Installation
- Quick Start
- Usage Guide
- Supported Intune Components
- Command Line Options
- Configuration
- Best Practices
- Troubleshooting
- Contributing
- License
TenuVault is a PowerShell-based tool designed to backup and restore Microsoft Intune configurations. Whether you're managing a production environment, setting up a test tenant, or need to maintain configuration history, TenuVault provides a safe and reliable way to preserve your Intune policies.
- Backs up your Intune configurations to local JSON files
- Restores configurations by creating new policies (never overwrites existing ones)
- Compares backups to detect configuration drift
- Exports configurations in multiple formats (JSON, CSV, HTML)
- Maintains a complete audit trail with comprehensive logging
- Never modifies existing policies in your tenant
- Never deletes any policies
- Never overwrites your current configuration
- Never makes unauthorized changes to your Intune environment
- Automated backup of all Intune configuration types
- Timestamped backups for version control
- Metadata tracking for easy backup management
- Creates new policies with "[Restored]" prefix
- Skip existing policies automatically
- Preview mode for dry-run testing
- No risk of overwriting production configurations
- Compare current tenant state with backups
- Identify removed or modified policies
- Selective restoration of specific policies
- JSON for data portability
- CSV for spreadsheet analysis
- HTML for visual reporting
- Detailed operation logs
- Configurable log levels
- Automatic log rotation
TenuVault is designed with safety as the primary concern:
-
Read-Only Backups: The backup operation only reads from your Intune tenant. It never modifies anything.
-
Non-Destructive Restores: Restore operations create NEW policies with a "[Restored]" prefix. Your existing policies remain untouched.
-
Preview Mode: Test any restore operation without making actual changes.
-
Explicit Confirmations: All potentially impactful operations require explicit user confirmation.
- Windows PowerShell 5.1 or PowerShell Core 7.x
- Microsoft.Graph.Authentication module (automatically installed with TenuVault)
- Administrator access to your Microsoft Intune tenant
The following Microsoft Graph permissions are required:
Delegated Permissions:
- DeviceManagementConfiguration.ReadWrite.All
- DeviceManagementApps.ReadWrite.All
- DeviceManagementServiceConfig.ReadWrite.All
Note: ReadWrite permissions are required for both backup and restore operations. The script uses read-only API calls for backup, but the Graph API requires ReadWrite scope.
# Install TenuVault from PowerShell Gallery
Install-Script -Name TenuVault
# Run TenuVault
TenuVaultOn first run, TenuVault will:
- Check for the Microsoft.Graph.Authentication module
- Install it automatically if not present
- Connect to Microsoft Graph with required permissions
- Begin the interactive session
To update to the latest version from PowerShell Gallery:
# Update TenuVault to the latest version
Update-Script -Name TenuVault
# Verify the installed version
Get-InstalledScript -Name TenuVault- Install and launch TenuVault:
# Install from PowerShell Gallery (first time only)
Install-Script -Name TenuVault
# Run TenuVault
TenuVault- Select option
[1]to create a backup - Enter a descriptive name for your backup (optional)
- Select components to backup or choose "All"
- Wait for the backup to complete
- Launch TenuVault with
TenuVaultcommand - Select option
[3]for Preview Mode (dry run) - Choose a backup to preview
- Review what would be created
- If satisfied, use option
[2]to perform actual restore
Backups are stored in timestamped folders containing:
- Individual JSON files for each policy
- Metadata file with backup information
- Organized by policy type in subfolders
Example backup structure:
IntuneBackups/
├── backup-Production-2024-01-15-143022/
│ ├── metadata.json
│ ├── DeviceConfigurations/
│ │ ├── Windows_BitLocker_Policy.json
│ │ └── iOS_Email_Configuration.json
│ ├── CompliancePolicies/
│ │ └── Windows_Compliance_Baseline.json
│ └── ConfigurationPolicies/
│ └── Edge_Security_Settings.json
When you restore policies:
- Each policy gets a "[Restored]" prefix added to its name
- If a policy with that name already exists, it's skipped
- No existing policies are modified or deleted
- You receive a summary of successful and skipped restorations
Always use Preview Mode first to understand what will happen:
- Shows which policies would be created
- Identifies policies that already exist
- No actual changes are made
Drift detection helps you understand how your current Intune configuration differs from a backup:
- Removed Policies: Exist in backup but not in current tenant
- Modified Policies: Exist in both but with differences
- Unchanged Policies: Identical in backup and current tenant
You can selectively restore removed or modified policies.
TenuVault supports backing up and restoring the following Intune policy types:
- Device Configuration Policies - Traditional device configuration profiles for all platforms
- Compliance Policies - Device compliance rules for Windows, iOS, Android, and macOS
- Settings Catalog Policies - Modern configuration profiles using the Settings Catalog
- Administrative Templates - Group Policy settings for Windows devices
- App Protection Policies - MAM policies for iOS and Android apps
- PowerShell Scripts - Device management scripts for Windows devices
# Run in interactive mode (default)
TenuVault
# Create a backup directly
TenuVault -Backup
# Export latest backup to JSON
TenuVault -Export -ExportFormat JSON
# Import configuration from file
TenuVault -Import -ImportFile "C:\exports\config.json"
# Specify custom backup location
TenuVault -BackupLocation "D:\IntuneBackups"
# Enable verbose logging
TenuVault -Verbose -LogLevel Verbose| Parameter | Description | Default |
|---|---|---|
-Backup |
Perform backup immediately | Interactive mode |
-Export |
Export latest backup | - |
-ExportFormat |
Format for export (JSON/CSV/HTML/All) | JSON |
-Import |
Import configuration | - |
-ImportFile |
Path to import file | - |
-BackupLocation |
Custom backup directory | .\IntuneBackups |
-LogLocation |
Custom log directory | .\Logs |
-LogLevel |
Logging verbosity (Verbose/Info/Warning/Error) | Info |
-NoLogo |
Skip banner display | False |
-Verbose |
Enable verbose output | False |
- Backups:
.\IntuneBackups\ - Logs:
.\Logs\ - Exports:
.\IntuneBackups\exports\ - Reports:
.\IntuneBackups\reports\
You can modify default settings at the top of the TenuVault.ps1 script:
# Backup Settings
$script:BackupLocation = ".\IntuneBackups"
$script:MaxBackupAge = 90 # Days to retain backups
# Logging Settings
$script:LoggingEnabled = $true
$script:LogLocation = ".\Logs"
$script:CurrentLogLevel = "Info"
# Component Selection
$script:Components = @(
"DeviceConfigurations",
"CompliancePolicies",
"ConfigurationPolicies",
"AppProtectionPolicies",
"Scripts",
"AdminTemplates"
)- Schedule daily backups for production environments
- Create backups before major changes
- Use descriptive names for important backups
- Always use Preview Mode first
- Test restores in a development tenant
- Verify restored policies before assigning to production groups
- Regularly clean up old backups (option 10)
- Export important backups to long-term storage
- Document significant backups in your change management system
- Store backups in a secure location
- Restrict access to backup files
- Regularly audit backup access logs
- Document your backup naming convention
- Maintain a restoration runbook
- Keep track of backup retention policies
Error: Insufficient permissions to access Intune
Solution: Ensure your account has the required Graph API permissions listed in the Requirements section.
Error: Microsoft.Graph.Authentication module not found
Solution: Install the required module:
Install-Module Microsoft.Graph.Authentication -Scope CurrentUserOr reinstall TenuVault from PowerShell Gallery:
Install-Script -Name TenuVault -ForceError: Failed to connect to Microsoft Graph
Solution:
- Check your internet connection
- Verify your credentials
- Ensure MFA requirements are met
- Try disconnecting and reconnecting:
Disconnect-MgGraph
Connect-MgGraph -Scopes "DeviceManagementConfiguration.ReadWrite.All"Error: No backups found in location
Solution:
- Verify the backup location path
- Check if backups exist in the specified directory
- Use option 11 to change backup location if needed
- Check Logs: Review log files in the
.\Logsdirectory - Enable Verbose Mode: Run with
-Verboseparameter for detailed output - Preview First: Always use Preview Mode to understand operations
- GitHub Issues: Report issues at https://github.com/yourusername/tenuvault/issues
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
TenuVault is licensed under the MIT License. See LICENSE file for details.
Note: TenuVault is a community tool and is not officially supported by Microsoft. Always test in a development environment before using in production.