New

EmeraldHost 2.0 is here: faster, more intuitive, and made for everyone - the new panel!

Learn more
Guides
WindowsExpand Windows Hard Drive

How to Expand the C: Drive on Your Windows Server

Expand the C: drive on a Windows Server

2 min read
May 19, 2025

When deploying a Windows Server, it may happen that the entire available storage space is not automatically assigned to the C: partition. This guide describes how you can automatically add the unallocated space to your C: drive using a provided script.

Requirements

  • A Windows Server where the script will be executed.
  • Administrator rights on the server.

Steps

  1. Download the script

    • Download the following script directly to your Windows Server:

      https://cdn.emeraldhost.de/products/rootserver/windows-patch/extend-disk/remove_recovery_and_extend.bat
      
  2. Run the script as administrator

    1. Navigate to the location of the downloaded file.
    2. Right-click on the file remove_recovery_and_extend.bat.
    3. Select Run as administrator.
  3. Automatic expansion of the C: drive

    • After running the script, the unused space will be automatically added to the C: partition without any manual intervention.
  4. Troubleshooting

    • If the script does not run correctly or the partition expansion fails:
      • Ensure you have administrator rights.
      • Restart the server after running the script and check the disk space again.
      • If problems persist, feel free to contact our Support.

That's it! With these steps, you should be able to automatically expand the C: drive of your Windows Server.

Written byEmeraldHost Team
Last updated on Mar 19, 2026 Edit on GitHub

Did this article help you?

Your feedback helps us improve our guides.

Help shape the guides

€10.00 in credit for every new guide, €5.00 for every improvement.

Contact Support

Create a support ticket and our team will get back to you as soon as possible – personal and professional.

Go to Support
1257 members online

Discord Community

Connect with other players, get quick help from the community, and stay up to date with the latest news.

Join Discord

Join our Discord community 1257 members online right now