21 August 2020

Deleting the Windows 10 Recovery Partition

We use VMWare for our servers and sometimes virtualized desktops. One of the issues we ran into was expanding the disk space on a virtual machine. When disk space was added, the C: drive could not be expanded because of the reserve drive "being in the way". The additional space would have to be made into a separate drive.

To fix this issue, I deleted the Windows 10 recovery partition, which on all of our builds is the fourth partition. Our VMWare virtual machines are backed up in real-time, thereby doing away with the need for the recovery drive  It is important to go into diskpart and make sure your machines are built and configured like ours. This will not work if they are not. The picture below is how all of our systems are partitioned during the build process. I have integrated the PowerShell one-liner below as a task sequence to run 

The following PowerShell one-liner will delete the partition 4.

 Remove-Partition -DiskNumber ((Get-Disk).Number) -PartitionNumber ((Get-Partition -DiskNumber ((Get-Disk).Number) | Where-Object {$_.Type -eq 'Recovery'}).PartitionNumber) -PassThru -Confirm:$false  

Related Posts:

  • Font Installation Script This script will install all fonts residing in the same folder as this script resides. I reads all of the font file names in the directory into an array. It then binds the script to the fonts folder and copies the fonts ove… Read More
  • Verify SCCM Base Build This will check for installed programs by verifying the existance of the uninstall registry key. This is located in the SCCM task sequencing just before the sysprep process. This also checks to see other settings on the mach… Read More
  • Display All Logged On Users in a Domain If you are like me, sometimes you need to find a few machines where no users are logged in. I have written this script that will scan a list of machines and tell whether a user is logged on or not. It reads a list of machine… Read More
  • SCCM Advanced Client Cache Size Reporting This script will run a WMI query to gather the size of the advanced client cache and the amount of cache memory in use. It then makes a copy of the MIF file to be modified with the cache size and memory in use. It is then m… Read More
  • OpenLM Agent Silent Install Installing OpenLM Agent is a relatively straight-forward process. There are no settings required for the msi installer. In order to make it a silent install, you first need to install it on your own machine. Once installed,… Read More

0 comments:

Post a Comment