> For the complete documentation index, see [llms.txt](https://wiki.bryanpcoleman.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.bryanpcoleman.com/microsoft-windows/moving-windows-recovery-partition.md).

# Moving Windows Recovery Partition

Open Command Prompt as Admin

```
reagentc /disable
```

This command disables the recovery partition and moves it into a file named Winre.wim, located in C:\Windows\System32\Recovery.

With Command Prompt still open, perform the following actions:

```
diskpart
```

```
list disk
```

```
select disk ##
```

```
list partition
```

```
select partition ##
```

You are selecting the Recovery Partition at this point. We are going to delete it and then recreate it at the end of the disk space.

```
delete partition override
```

Open Disk Management and check out the disk. The Recovery Partition should be gone. To put the recovery partition back, we will need to expand the disk size, but leave 1024MB of space. So, take the remaining space in the Extend Volume Wizard, subtract 1024, and use that product as the expanded volume size.

On the 1024MB (1GB) unallocated space at the end of the disk, create a New Simple Volume with the following settings:

* Do not assign drive letter
* Volume Label: New Recovery

Click Next and finish the new volume setup. Then, return to your elevated Command Prompt and DiskPart to finish adding the recovery partition back using the following commands:

```
list partition

select partition ##
```

For GPT disks, we need to set the identifier so enter the following command exactly as you see it:

```
set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
```

We then need to hide the drive, so again, enter the following command exactly:

```
gpt attributes=0x8000000000000001
```

Note: there are 14 zeros in the number above, if you are unable to copy/paste into a terminal window

Keeping the Command Prompt window open, type the following to Exit DiskPart

```
exit
```

IMPORTANT: Re-enable the Windows Recovery Partition using the following command:

```
reagentc /enable
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.bryanpcoleman.com/microsoft-windows/moving-windows-recovery-partition.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
