โญ If this tool helped you, please consider giving it a star! โญ
A comprehensive PowerShell-based tool to disable telemetry and data collection across Microsoft development tools including Visual Studio, Visual Studio Code, .NET CLI, and NuGet.
- Comprehensive Coverage: Disables telemetry for Visual Studio 2015-2022, VS Code, .NET CLI, and NuGet
- Backup & Restore: Create registry backups before making changes and restore when needed
- Smart Detection: Only modifies existing registry paths - doesn't create unnecessary entries
- PowerShell 7 Optimized: Enhanced performance and modern PowerShell features
- Administrator Safety: Requires admin privileges and validates permissions
- Cross-Version Support: Works with PowerShell 5.1 and 7.0+
- Detailed Logging: Color-coded output with comprehensive status reporting
- Customer Experience Improvement Program (CEIP)
- Feedback dialogs and crash reporting
- Automatic data collection
- VS Standard Collector Service
- Telemetry reporting
- Crash reporter
- Automatic experiments
- Extension auto-updates
- Usage analytics
- .NET CLI telemetry collection
- NuGet package usage analytics
- Performance data collection
- Windows SQM (Software Quality Metrics) Client
- Application Insights data collection
- Telemetry directories cleanup
- Windows operating system
- Administrator privileges
- PowerShell 5.1 or PowerShell 7.0+
-
Download the tool:
git clone https://github.com/your-username/vs-telemetry-disable.git cd vs-telemetry-disable
-
Or download as ZIP:
- Click "Code" โ "Download ZIP"
- Extract to your desired location
- Right-click on
Launcher.bat
and select "Run as administrator" - Follow the interactive prompts
- The launcher will automatically detect your PowerShell version and run the appropriate script
# PowerShell 7
.\script\off_telemetry_ps7.ps1
# PowerShell 5
.\script\off_telemetry_ps5.ps1
# Create backup before making changes
.\script\off_telemetry_ps7.ps1 -CreateBackup
# Create backup to specific location
.\script\off_telemetry_ps7.ps1 -CreateBackup -BackupPath "C:\MyBackups\telemetry_backup.reg"
# Restore from default backup location
.\script\off_telemetry_ps7.ps1 -RestoreBackup -BackupPath "path\to\your\backup.reg"
# Create backup and continue with telemetry disable
.\script\off_telemetry_ps7.ps1 -CreateBackup
# Restore specific backup file
.\script\off_telemetry_ps7.ps1 -RestoreBackup -BackupPath "C:\Backups\telemetry_backup_20241201_143022.reg"
# Create backup to custom location without running disable
.\script\off_telemetry_ps7.ps1 -CreateBackup -BackupPath "D:\MyBackups\vs_telemetry.reg"
vs-telemetry-disable/
โโโ Launcher.bat # Interactive launcher script
โโโ assets/
โ โโโ preview.gif # Tool demonstration
โโโ script/
โ โโโ off_telemetry_ps7.ps1 # PowerShell 7.0+ version
โ โโโ off_telemetry_ps5.ps1 # PowerShell 5.1 version
โโโ README.md # This file
โโโ LICENSE # MIT License
โโโ .gitignore # Git ignore rules
- PowerShell Version Detection: Launcher automatically detects available PowerShell versions
- Registry Path Validation: Only existing registry paths are modified
- Service Management: Safely stops and disables telemetry services
- Environment Variables: Sets opt-out environment variables
- File Cleanup: Removes existing telemetry data directories
The tool modifies the following registry areas (only if they exist):
HKLM:\SOFTWARE\Microsoft\VSCommon\*\SQM
HKLM:\SOFTWARE\Policies\Microsoft\VisualStudio
HKCU:\Software\Microsoft\VisualStudio
HKLM:\SOFTWARE\Microsoft\SQMClient
DOTNET_CLI_TELEMETRY_OPTOUT=1
NUGET_TELEMETRY_OPTOUT=true
POWERSHELL_TELEMETRY_OPTOUT=1
- Administrator Rights Required: The script must run with administrator privileges
- Backup Recommended: Always create a backup before making changes
- Restart Required: Some changes may require a system restart to take full effect
- Existing Paths Only: The script only modifies existing registry entries
- VS Code Settings: Creates/updates VS Code settings.json with privacy-focused configuration
# Default backup location (Desktop with timestamp)
.\script\off_telemetry_ps7.ps1 -CreateBackup
# Custom backup location
.\script\off_telemetry_ps7.ps1 -CreateBackup -BackupPath "C:\Backups\my_backup.reg"
# Restore from backup
.\script\off_telemetry_ps7.ps1 -RestoreBackup -BackupPath "path\to\backup.reg"
Backup files are standard Windows Registry (.reg) files that can be imported manually if needed.
"This script must be run as Administrator"
- Right-click the batch file and select "Run as administrator"
- Or run PowerShell as administrator and execute the script directly
"PowerShell script not found"
- Ensure the
script
folder contains the PowerShell files - Check that file paths are correct
"No compatible PowerShell version found"
- Install PowerShell 7 (recommended) or ensure Windows PowerShell 5.1 is available
To verify the changes worked:
- Check environment variables in a new command prompt
- Look for disabled services in Services.msc
- Check VS Code settings.json for updated privacy settings
- Review registry entries (if comfortable with registry editing)
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Test on both PowerShell 5.1 and 7.0+
- Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
EXLOUD
- Microsoft for providing comprehensive documentation on registry settings
- PowerShell community for best practices and patterns
- Contributors and users who provide feedback and improvements
Component | Status | Notes |
---|---|---|
Visual Studio 2015 | โ Supported | If installed |
Visual Studio 2017 | โ Supported | If installed |
Visual Studio 2019 | โ Supported | If installed |
Visual Studio 2022 | โ Supported | If installed |
Visual Studio Code | โ Supported | If installed |
.NET CLI | โ Supported | Always processed |
NuGet | โ Supported | Always processed |
PowerShell 5.1 | โ Supported | Windows PowerShell |
PowerShell 7.0+ | โ Supported | Recommended |
- GUI interface for easier usage
- Support for additional Microsoft development tools
- Scheduled telemetry cleanup
- Configuration profiles for different scenarios
- Integration with package managers
โญ If this tool helped you, please consider giving it a star!