How to Activate Windows and Microsoft Office Using Microsoft Activation Scripts (MAS)
Overview: This Tech DIY guide walks you through activating Windows (from 7 onwards) and Microsoft Office (2010 and later) using the open-source Microsoft Activation Scripts (MAS). MAS is a free, community-maintained tool hosted on GitHub that provides multiple activation methods like HWID (Hardware ID), Ohook, Online KMS, and more—ideal for home labs, testing, or extending trial periods legally where permitted. It supports Extended Security Updates (ESU) and includes troubleshooting tools. We'll use the simple PowerShell one-liner irm https://get.activated.win | iex to fetch and run the latest version securely. Always run as administrator, and note: This is for educational purposes; check local laws for production use.
Why Use MAS? Features and Benefits
MAS stands for Microsoft Activation Scripts and is developed by the community (repository: https://github.com/massgravel/Microsoft-Activation-Scripts). It's lightweight, doesn't require installation, and offers:
- Multiple Activation Methods: HWID for permanent digital licensing (Windows 10/11), Ohook for Office, Online KMS for 180-day renewals, TSforge for advanced setups, and KMS38 for long-term activation.
- Supported Products: Windows 7/8/10/11, Office 2010–2024 (including LTSC and C2R editions), Visual Studio, and even unsupported ones like Windows XP or Office for macOS (via separate guides).
- Safety Checks: The bootstrap script verifies file integrity (SHA-256 hash), detects antivirus interference, and ensures .NET Framework compatibility.
- Troubleshooting Built-In: Tools to check activation status, remove prior activations, or diagnose issues like proxy blocks.
- Unattended Mode: For scripting/automation via command-line switches.
Important Disclaimer: MAS uses public KMS servers and digital entitlements, which Microsoft allows for volume licensing scenarios. It's not for piracy—use only on legally obtained software. Antivirus may flag it (false positive); add exceptions if needed. Always download from official sources to avoid malware.
Prerequisites: What You'll Need
- System Requirements: Windows 7 or later (Vista supported manually), PowerShell 2.0+ (built-in on Windows 7+), internet connection for initial download, and administrator privileges.
- Disable Security Temporarily: Pause real-time antivirus (e.g., Windows Defender) during execution—reenable after. If using a firewall/proxy, ensure PowerShell can access the internet.
- Legal Software: Ensure you have genuine Windows/Office installs (e.g., from ISO or trial). MAS won't "crack" pirated copies.
- Backup: Create a system restore point via Control Panel > Recovery > Create a restore point.
Verify your current activation status first: Open Command Prompt as admin and run slmgr /xpr (for Windows) or check in any Office app under File > Account.
Step 1: Prepare PowerShell and Run the One-Liner Command
- Right-click the Start button and select Windows PowerShell (Admin) or Terminal (Admin) (on Windows 11). If prompted by UAC, click Yes.
In the PowerShell window, paste and press Enter:
irm https://get.activated.win | iexWhat this does:
irm(Invoke-RestMethod) downloads the bootstrap script from https://get.activated.win, which fetches the latest MAS_AIO.cmd from GitHub/Azure DevOps mirrors, verifies its SHA-256 hash (D60752A27BDED6887C5CEC88503F0F975ACB5BC849673693CA7BA7C95BCB3EF4), and runs it in a temp CMD window. A progress bar shows download status.If the above fails (e.g., ISP block), try alternatives:
For Windows 10/11 with curl:
iex (curl.exe -s --doh-url https://1.1.1.1/dns-query https://get.activated.win | Out-String)For older Windows:
iex ((New-Object Net.WebClient).DownloadString('https://get.activated.win'))
The script auto-elevates if needed and checks for issues like restricted PowerShell mode (fix via massgrave.dev/fix_powershell).
- If antivirus blocks it, add an exclusion for PowerShell.exe and temp folders (%TEMP%). The script will warn you with links to troubleshooting.
Step 2: Navigate the MAS Menu and Choose Activation
- Once launched, MAS opens a green-highlighted menu in CMD. It auto-detects your installed products (Windows/Office versions).
- For Windows Activation: Select [1] (HWIDGEN) for permanent activation on Windows 10/11 (digital license tied to hardware). Or [2] (Online KMS) for 180-day activation (auto-renews). Press Enter and follow prompts—it may require a restart.
- For Office Activation: Select [3] (Ohook) for permanent activation (supports 2010–2024, including Visio/Project). Or [4] (Online KMS) for trials. MAS injects the method without altering files.
- Advanced Options: Use [5] for ESU activation, [6] for Visual Studio, or [7] for troubleshooting (e.g.,
Check Activation StatusorRemove Activation). - After selection, MAS runs silently (progress shown). Close the window when done—it auto-cleans temp files.
Example Output: You'll see messages like "Activation successful! Reboot recommended." For KMS, it sets a 180-day timer; run MAS again to renew.
Step 3: Verify Activation and Restart
- For Windows: Run
slmgr /xprin CMD—should show "Permanently activated" or "Time remaining: 180 days." - For Office: Open Word/Excel, go to File > Account > Product Information—look for "Product Activated."
- Restart your PC to apply changes fully.
- Re-enable antivirus and test features (e.g., updates via Settings > Update & Security).
Alternative: Manual Download Method (No PowerShell)
If PowerShell issues persist:
- Download MAS_AIO.cmd directly: Direct Download or full ZIP: ZIP.
- Right-click the .cmd file > Run as administrator.
- Follow the same menu as Step 2.
Troubleshooting Common Issues
- Execution Policy Blocked: Run
Set-ExecutionPolicy Bypass -Scope Processin PowerShell first. - Hash Mismatch/Download Fail: Check internet/firewall; report at massgrave.dev/troubleshoot.
- Antivirus Flags: Whitelist the script—it's open-source and scanned clean.
- Unsupported Version: See unsupported guide or use command-line switches (e.g.,
MAS_AIO.cmd /KMS38for 2038 expiry). - Reactivation Needed: Run MAS's removal tool first, then reactivate.
For more: Visit the official docs or GitHub issues.
Final Tips and Resources
MAS is updated regularly—rerun the one-liner for the latest. For automation, explore switches. Remember, this empowers DIY techies but respects Microsoft's ecosystem. If issues persist, community forums like Reddit's r/MAS are helpful.



