Resize-UserProfileDisk icon indicating copy to clipboard operation
Resize-UserProfileDisk copied to clipboard

Not shrinking VHDX files

Open rridge opened this issue 4 years ago • 1 comments

Whether I run -Defrag with or without -ZeroFreeSpace, the end result is no free space being reclaimed. I've tried both the GitHub and TechNet versions of the script with no change in result. The defrag recognizes 8GB of free space but then makes no changes to the file (see screenshot).

Screen Shot 2020-09-08 at 10 36 15 AM

rridge avatar Sep 08 '20 20:09 rridge

Additional information from the logs included.

Diskpart log: Microsoft DiskPart version 6.3.9600

Copyright (C) 1999-2013 Microsoft Corporation. On computer: FILE02

The arguments specified for this command are not valid. For more information on the command type: HELP SELECT VDISK

Logfile: Information 8-9-2020 14:41:45 Creating log Diskpart_log_8-9-2020_14-41.log... Done Information 8-9-2020 14:41:45 Start calculation .vhdx file size... Information 8-9-2020 14:41:45 Start calculation .vhdx file size... Done Information 8-9-2020 14:41:45 ---------- STARTING -------- Information 8-9-2020 14:41:45 Start calculation .vhdx file sizes... Information 8-9-2020 14:41:45 Start calculation .vhdx file sizes... Done Information 8-9-2020 14:41:45 E:\RDS Profiles\UVHD-redacted.vhdx is accessible. Information 8-9-2020 14:41:45 Starting shrinking of the .vhdx-files. DISKPART /S is using the C:\users\admin\desktop\Resize-UserProfileDisk\diskpart_script.txt script file. Information 8-9-2020 14:41:45 Starting shrinking of the .vhdx-files... Done Information 8-9-2020 14:41:45 Check if there are still mounted UPDs Information 8-9-2020 14:41:46 0 mounted UPD(s) found. Try to dismounting. Information 8-9-2020 14:41:46 diskpart_script.txt cleared... Information 8-9-2020 14:41:46 Script has an elapsed time of 0 hour, 0 minutes and 1 Seconds Information 8-9-2020 14:41:46 Script has processed 1 files Information 8-9-2020 14:41:46 Resizing-UserProfileDisk script ending... Information 8-9-2020 14:41:46 ---------- ENDING --------

rridge avatar Sep 08 '20 21:09 rridge