In order to prevent resize failures on Windows volumes, you will need to remove all the junction points on the volume. This article describes a method to remove all junction points with a single command.
Warning: This script was designed to be run on a fresh OS install for base class creation. It removes ALL junction points without any discrimination. However, from past experience, you should be careful when removing junction points, as some of them may be necessary for certain OS’s functionalities (typical example might be the correspondence between the directory names in localized languages and the ones in English). In short, do not indiscriminately remove junction points on a production appliance, or make sure you make a copy for testing.
Requirements
Batch File
|
junction -s -q c:\ | findstr /c:JUNCTION | cut -d":" -f2 | sed 's/\\\\\\\\/c:\\\\/' > junctions.txt for /F "tokens=*" %%A in (junctions.txt) do junction -d "%%A" |
Create this batch file in C:\ and make sure that you remove the .txt extension. Run this batch file and all junction points will be deleted. This batch file will leave behind a text file named junctions.txt which is a list of junction points that were deleted.
|
Copyright © 2012 CA.
All rights reserved.
|
|