I just ran the code. Below is the readout from running it. I next will reboot.
I noticed in running it, there was nothing in the code to make the new partition a Recovery partition. It now is a Primary partition. Is that what we want for now?
Microsoft Windows [Version 10.0.19041.388]
(c) 2020 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>DiskPart
Microsoft DiskPart version 10.0.19041.1
Copyright (C) Microsoft Corporation.
On computer: COMPUTER
DISKPART> Select Disk 0
Disk 0 is now the selected disk.
DISKPART> List Part
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 Reserved 128 MB 17 KB
Partition 2 Recovery 400 MB 129 MB
Partition 3 System 300 MB 529 MB
Partition 4 Primary 681 GB 829 MB
Partition 5 Recovery 826 MB 682 GB
Partition 6 Recovery 15 GB 682 GB
DISKPART> Select Part 5
Partition 5 is now the selected partition.
DISKPART> Delete Partition Override
DiskPart successfully deleted the selected partition.
DISKPART> Create Partition Primary
DiskPart succeeded in creating the specified partition.
DISKPART> List Part
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 Reserved 128 MB 17 KB
Partition 2 Recovery 400 MB 129 MB
Partition 3 System 300 MB 529 MB
Partition 4 Primary 681 GB 829 MB
* Partition 5 Primary 826 MB 682 GB
Partition 6 Recovery 15 GB 682 GB
DISKPART> Format Quick FS=NTFS Label="Recovery Tools"
100 percent completed
DiskPart successfully formatted the volume.
DISKPART> Assign Letter=R
DiskPart successfully assigned the drive letter or mount point.
DISKPART> Set ID="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
DiskPart successfully set the partition ID.
DISKPART> GPT Attributes=0x8000000000000001
DiskPart successfully assigned the attributes to the selected GPT partition.
DISKPART> List Vol
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
Volume 0 D Vid UDF DVD-ROM 5588 MB Healthy
Volume 1 Recovery NTFS Partition 400 MB Healthy
Volume 2 C Gateway NTFS Partition 681 GB Healthy Boot
Volume 3 R Recovery To NTFS Partition 826 MB Healthy
Volume 4 Push Button NTFS Partition 15 GB Healthy
Volume 5 ESP FAT32 Partition 300 MB Healthy System
DISKPART> List Part
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 Reserved 128 MB 17 KB
Partition 2 Recovery 400 MB 129 MB
Partition 3 System 300 MB 529 MB
Partition 4 Primary 681 GB 829 MB
* Partition 5 Recovery 826 MB 682 GB
Partition 6 Recovery 15 GB 682 GB
DISKPART> Exit
Leaving DiskPart...
C:\WINDOWS\system32>
