This message was deleted.
# microsoft-fslogix
s
This message was deleted.
l
Nice stuff here David. Did you find disk part 100% reliable?
d
So far, yes.
d
nice 👍
j
Nice!
l
Ive had scenarios where the hyper-v cmdlets did make a difference and diskpart didnt. I didn't spend alot of time digging. Thanks for this David. I like it.
d
i think the key for diskpart to work is to perform the defrag first
l
Sounds about right. Explains the inconsistency where sometimes it does etc....
j
And this is only doing the unlocked ones?
d
correct
👍 1
you cannot compact a locked vhd(x) file
j
Yep
d
it checks the file before trying
j
Nice work!
d
the message window will say <path of the vhd(x)> is currently locked - skipping if it finds the file is locked
i plan on rewriting it to be more responsive - if you select all the profiles it will basically lock the window, and if you decide to close it before it is done you have to check to make sure you dont have a vhd(x) attached.
but it works
l
I have a script that sends a html email with the profiles that are compacted. That's Hyper-V tools though. I have a diskpart one too but didn't know about the defrag. Much appreciated.