This script can be added to a Windows 10 in-place upgrade Task Sequence to remove an additional, unwanted, partition such as a D: drive.

For further information on how to use the Tool go to https://sccmentor.wordpress.com/2015/05/08/remove-partition-as-part-of-windows-10-in-place-upgrade-with-powershell/.

If your extra partition is not a D: drive but another drive letter then search and replace D: within the script.

NOTE - Use with caution on encrypted hard drives and ensure that encryption is disabled prior to running the script.