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

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.